@API(type=EXTENDABLE,
src=PUBLIC)
public class WidthRepresentation
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
WidthRepresentation.Unit
The fixed width unit.
|
Modifier and Type | Field and Description |
---|---|
static WidthRepresentation |
DEFAULT_WIDTH_REPRESENTATION
The default width representation.
|
Constructor and Description |
---|
WidthRepresentation(float fixedWidthValue,
WidthRepresentation.Unit fixedWidthUnit,
float relativeWidth,
boolean isRelativeToParent)
Constructor.
|
WidthRepresentation(java.lang.String widthString,
boolean acceptPercents)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAlign()
Get the text align specified on the colspec.
|
float |
getFixedWidth() |
WidthRepresentation.Unit |
getFixedWidthUnit() |
float |
getRelativeWidth() |
java.lang.String |
getWidthRepresentation() |
boolean |
isApplicable() |
boolean |
isRelativeToParent() |
boolean |
isSpecified()
Check if this width is specified.
|
void |
setAlign(java.lang.String align)
Set the text align specified on the colspec.
|
java.lang.String |
toString() |
public static WidthRepresentation DEFAULT_WIDTH_REPRESENTATION
public WidthRepresentation(float fixedWidthValue, WidthRepresentation.Unit fixedWidthUnit, float relativeWidth, boolean isRelativeToParent)
fixedWidthValue
- The fixed width value. Ex: 2.5fixedWidthUnit
- The unit of fixed width. Defaults to PIXEL.relativeWidth
- The relative width part. Ex: 0.33isRelativeToParent
- If true
then the relative width represents
a percentage of the parent table width, otherwise the relative value
represent a proportional width which is evaluated taking into account
the proportional values of the other columns.
public WidthRepresentation(java.lang.String widthString, boolean acceptPercents)
widthString
- The string representation of the Width. The
representation format must be a sum of terms with the following format:
n(*|%|units). If there are more that one terms with the same form (fixed
or relative) then corresponding width (fixed or relative) will be reseted.acceptPercents
- If true
then percentage values are
acceptedpublic float getFixedWidth()
public WidthRepresentation.Unit getFixedWidthUnit()
public float getRelativeWidth()
public boolean isRelativeToParent()
true
if the relative part of the width is expressed
relative to the parent width, false
if is expressed relative to other siblings.public boolean isApplicable()
true
if the current width representation should be taken
into account when building the layout.public boolean isSpecified()
true
if the width representation is resulted from a
width specified in the document or false
if this a default
width representation.public java.lang.String getAlign()
public void setAlign(java.lang.String align)
align
- The align value.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String getWidthRepresentation()
[fixed_width][fixed_width_unit] + [relative_width %|*]
© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.