com.aspose.words
Class PreferredWidth

java.lang.Object
    extended by com.aspose.words.PreferredWidth

public class PreferredWidth 
extends java.lang.Object

Represents a value and its unit of measure that is used to specify the preferred width of a table or a cell.

Preferred width can be specified as a percentage, number of points or a special "none/auto" value.

The instances of this class are immutable.

See Also:
RowFormat.PreferredWidth, CellFormat.PreferredWidth

Field Summary
static final PreferredWidthAUTO
           Returns an instance that represents the "preferred width is not specified" value.
 
Property Getters/Setters Summary
intgetType()
           Gets the unit of measure used for this preferred width value. The value of the property is PreferredWidthType integer constant.
doublegetValue()
           Gets the preferred width value. The unit of measure is specified in the Type property.
 
Method Summary
booleanequals(java.lang.Object obj)
           Determines whether the specified object is equal in value to the current object.
static PreferredWidthfromPercent(double percent)
           A creation method that returns a new instance that represents a preferred width specified as a percentage.
static PreferredWidthfromPoints(double points)
           A creation method that returns a new instance that represents a preferred width specified using a number of points.
inthashCode()
           Serves as a hash function for this type.
java.lang.StringtoString()
           Returns a user-friendly string that displays the value of this object.
 

Field Detail

AUTO

public static final PreferredWidth AUTO
Returns an instance that represents the "preferred width is not specified" value.

Property Getters/Setters Detail

getType

public int getType()
Gets the unit of measure used for this preferred width value. The value of the property is PreferredWidthType integer constant.

getValue

public double getValue()
Gets the preferred width value. The unit of measure is specified in the Type property.

Method Detail

equals

public boolean equals(java.lang.Object obj)
Determines whether the specified object is equal in value to the current object.

fromPercent

public static PreferredWidth fromPercent(double percent)
A creation method that returns a new instance that represents a preferred width specified as a percentage.
Parameters:
percent - The value must be from 0 to 100.

fromPoints

public static PreferredWidth fromPoints(double points)
A creation method that returns a new instance that represents a preferred width specified using a number of points.
Parameters:
points - The value must be from 0 to 22 inches (22 * 72 points).

hashCode

public int hashCode()
Serves as a hash function for this type.

toString

public java.lang.String toString()
Returns a user-friendly string that displays the value of this object.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.