|
Oxygen XML Editor 15.0 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectro.sync.ecss.extensions.api.WidthRepresentation
@API(type=EXTENDABLE, src=PUBLIC) public class WidthRepresentation
Specifies the fixed and relative width determined from the value of width/colwidth attribute of the col.
Nested Class Summary | |
---|---|
static class |
WidthRepresentation.Unit
The fixed width unit. |
Field Summary | |
---|---|
static WidthRepresentation |
DEFAULT_WIDTH_REPRESENTATION
The default width representation. |
Constructor Summary | |
---|---|
WidthRepresentation(float fixedWidthValue,
WidthRepresentation.Unit fixedWidthUnit,
float relativeWidth,
boolean isRelativeToParent)
Constructor. |
|
WidthRepresentation(java.lang.String widthString,
boolean acceptPercents)
Constructor. |
Method Summary | |
---|---|
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()
|
void |
setAlign(java.lang.String align)
Set the text align specified on the colspec. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static WidthRepresentation DEFAULT_WIDTH_REPRESENTATION
Constructor Detail |
---|
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
acceptedMethod Detail |
---|
public 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 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 %|*]
|
Oxygen XML Editor 15.0 Author API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |