Base object for all areas.
BT
public static final int BT
Stacking bottom to top
CLASS_ABSOLUTE
public static final int CLASS_ABSOLUTE
Absolute position class
CLASS_BEFORE_FLOAT
public static final int CLASS_BEFORE_FLOAT
Before float class
CLASS_FIXED
public static final int CLASS_FIXED
Fixed position class
CLASS_FOOTNOTE
public static final int CLASS_FOOTNOTE
Footnote class
CLASS_MAX
public static final int CLASS_MAX
Maximum class count
CLASS_NORMAL
public static final int CLASS_NORMAL
Normal class
CLASS_SIDE_FLOAT
public static final int CLASS_SIDE_FLOAT
Side float class
LR
public static final int LR
Stacking left to right
ORIENT_0
public static final int ORIENT_0
Normal orientation
ORIENT_180
public static final int ORIENT_180
Rotate 180 degrees
ORIENT_270
public static final int ORIENT_270
Rotated 270 degrees clockwise
ORIENT_90
public static final int ORIENT_90
Rotated 90 degrees clockwise
RL
public static final int RL
Stacking right to left
TB
public static final int TB
Stacking top to bottom
bpd
protected int bpd
the area's block-progression-dimension
ipd
protected int ipd
the area's inline-progression-dimension
log
protected static Log log
logging instance
props
protected Map props
Traits for this area stored in a HashMap
addChildArea
public void addChildArea(Area child)
Add a child to this area.
The default is to do nothing. Subclasses must override
to do something if they can have child areas.
child
- the child area to add
addTrait
public void addTrait(Object traitCode,
Object prop)
Add a trait to this area.
traitCode
- the trait keyprop
- the value of the trait
addTrait
public void addTrait(Trait prop)
Add a trait property to this area.
getAllocBPD
public int getAllocBPD()
Get the allocation block progression dimension of this area.
This adds the content, borders, padding and spaces to find the
total allocated BPD.
- the total BPD allocation for this area
getAllocIPD
public int getAllocIPD()
Get the allocation inline progression dimension of this area.
This adds the content, borders and the padding to find the
total allocated IPD.
- the total IPD allocation for this area
getAreaClass
public int getAreaClass()
Get the area class of this area.
getBPD
public int getBPD()
Get the block progression dimension of the content rectangle
for this area.
- the block progression dimension
getBooleanTrait
public boolean getBooleanTrait(Object oTraitCode)
Get a boolean trait from this area.
oTraitCode
- the trait key
getBorderAndPaddingWidthAfter
public int getBorderAndPaddingWidthAfter()
Return the sum of region border- and padding-after
getBorderAndPaddingWidthBefore
public int getBorderAndPaddingWidthBefore()
Return the sum of region border- and padding-before
getBorderAndPaddingWidthEnd
public int getBorderAndPaddingWidthEnd()
Return the sum of region border- and padding-end
getBorderAndPaddingWidthStart
public int getBorderAndPaddingWidthStart()
Return the sum of region border- and padding-start
getIPD
public int getIPD()
Get the inline progression dimension of the content rectangle
for this area.
- the inline progression dimension
getSpaceAfter
public int getSpaceAfter()
Returns the space after
getSpaceBefore
public int getSpaceBefore()
Returns the space before
getSpaceEnd
public int getSpaceEnd()
Returns the space end
getSpaceStart
public int getSpaceStart()
Returns the space start
getTrait
public Object getTrait(Object oTraitCode)
Get a trait from this area.
oTraitCode
- the trait key
getTraitAsInteger
public int getTraitAsInteger(Object oTraitCode)
Get a trait from this area as an integer.
oTraitCode
- the trait key
getTraits
public Map getTraits()
Get the map of all traits on this area.
hasTrait
public boolean hasTrait(Object oTraitCode)
Checks whether a certain trait is set on this area.
oTraitCode
- the trait key
hasTraits
public boolean hasTraits()
- true if the area has traits
setAreaClass
public void setAreaClass(int areaClass)
Set the area class of this area.
areaClass
- the area class
setBPD
public void setBPD(int b)
Set the block progression dimension of the content rectangle
for this area.
b
- the new block progression dimension
setIPD
public void setIPD(int i)
Set the inline progression dimension of content rectangle
for this area.
i
- the new inline progression dimension
toString
public String toString()