FOM Reference > Formatting > Datatypes > fColumnWidth interface
  
fColumnWidth interface
This object is a datatype that represents a length value used in a block or table. It provides everything fLength provides plus the ability to specify the length relative to related objects in the same block or table.
measure attribute
The contents should be measured to determine this length. For example, when specified for the width of a column in a block or table, the contents of each cell is measured and the column is sized according to the largest cell.
measure
Access
read-write
Returns
boolean
percent attribute
The percentage of space this object represents. For example, the width of a column or gutter in a block or table could be specified as a percentage of the width of the entire block or table.
percent
Access
read-write
Returns
float
relative attribute
The relative amount of space this object represents. For example, each column in a block or table is assigned space from the total width of the block or table according to its share of the sum of relative widths of all columns in the block or table.
relative
Access
read-write
Returns
float
ruleWidth attribute
The width of the widest rule should be added to this length.
ruleWidth
Access
read-write
Returns
boolean
fColumnWidth method
Creates a new length object.
fColumnWidthlength
Parameters
Stringlength
The expression used to create the length.
In addition to the string representations accepted by the superclass, fLength, the string can contain the following:
#
A hash character that isn't followed by a double quote " indicates that the measure property should be true.
|
A vertical bar character | indicates that the ruleWidth property should be true.
[<n>]*
An asterisk * (optionally preceded by a number <n>) adds <n> (or 1 if <n> is missing) to the relative property.
<n>%
The number <n> is added to the percent property.
Returns
fColumnWidth. The newly created fColumnWidth object.
makeAbsolute method
Returns a length object after resolving any relative sizes if appropriate. Note that calling this method does not change this object but instead returns a new object with the desired property.
This method only acts on the properties of the underlying fLength object. That is, the returned object will have the same values in its percent, relative, ruleWidth and measure properties.
makeAbsolute
Parameters
None
Returns
fColumnWidth. An fColumnWidth object with an absolute underlying fLength object.
readResolve method
Return the object corresponding to the given serialized representation.
readResolveobj
Parameters
Objectobj
The serialized representation.
Returns
fColumnWidth. The object corresponding to the serialized representation.
toString method
Returns a string representation of this length. Users should not rely on the details of what is returned, but instead use valueOf() to obtain an integral value which represents the absolute length of this object for computations and can be converted back to an identical length object, or toUnit() if a representation in a particular unit of measurement is required.
The result of this method can be converted back to an fColumnWidth object by passing it to the constructor.
toString
Parameters
None
Returns
String. A string representation of this fColumnWidth object.