public class Area extends AreaTreeObject implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected int |
bpd
the area's block-progression-dimension
|
static int |
BT
Stacking bottom to top
|
static int |
CLASS_ABSOLUTE
Absolute position class
|
static int |
CLASS_BEFORE_FLOAT
Before float class
|
static int |
CLASS_FIXED
Fixed position class
|
static int |
CLASS_FOOTNOTE
Footnote class
|
static int |
CLASS_MAX
Maximum class count
|
static int |
CLASS_NORMAL
Normal class
|
static int |
CLASS_SIDE_FLOAT
Side float class
|
protected int |
ipd
the area's inline-progression-dimension
|
protected static org.apache.commons.logging.Log |
log
logging instance
|
static int |
LR
Stacking left to right
|
static int |
ORIENT_0
Normal orientation
|
static int |
ORIENT_180
Rotate 180 degrees
|
static int |
ORIENT_270
Rotated 270 degrees clockwise
|
static int |
ORIENT_90
Rotated 90 degrees clockwise
|
protected java.util.Map |
props
Traits for this area stored in a HashMap
|
static int |
RL
Stacking right to left
|
static int |
TB
Stacking top to bottom
|
extensionAttachments, foreignAttributes
Constructor and Description |
---|
Area() |
Modifier and Type | Method and Description |
---|---|
void |
addChildArea(Area child)
Add a child to this area.
|
void |
addTrait(java.lang.Object traitCode,
java.lang.Object prop)
Add a trait to this area.
|
int |
getAllocBPD()
Get the allocation block progression dimension of this area.
|
int |
getAllocIPD()
Get the allocation inline progression dimension of this area.
|
int |
getAreaClass()
Get the area class of this area.
|
int |
getBorderAndPaddingWidthAfter()
Return the sum of region border- and padding-after
|
int |
getBorderAndPaddingWidthBefore()
Return the sum of region border- and padding-before
|
int |
getBorderAndPaddingWidthEnd()
Return the sum of region border- and padding-end
|
int |
getBorderAndPaddingWidthStart()
Return the sum of region border- and padding-start
|
int |
getBPD()
Get the block progression dimension of the content rectangle
for this area.
|
int |
getIPD()
Get the inline progression dimension of the content rectangle
for this area.
|
int |
getSpaceAfter()
Returns the space after
|
int |
getSpaceBefore()
Returns the space before
|
int |
getSpaceEnd()
Returns the space end
|
int |
getSpaceStart()
Returns the space start
|
java.lang.Object |
getTrait(java.lang.Object oTraitCode)
Get a trait from this area.
|
boolean |
getTraitAsBoolean(java.lang.Object oTraitCode)
Get a boolean trait from this area.
|
int |
getTraitAsInteger(java.lang.Object oTraitCode)
Get a trait from this area as an integer.
|
java.util.Map |
getTraits()
Get the map of all traits on this area.
|
boolean |
hasTrait(java.lang.Object oTraitCode)
Checks whether a certain trait is set on this area.
|
boolean |
hasTraits() |
void |
setAreaClass(int areaClass)
Set the area class of this area.
|
void |
setBPD(int bpd)
Set the block progression dimension of the content rectangle
for this area.
|
void |
setIPD(int ipd)
Set the inline progression dimension of content rectangle
for this area.
|
java.lang.String |
toString() |
addExtensionAttachment, getExtensionAttachments, getForeignAttributes, getForeignAttributeValue, hasExtensionAttachments, setExtensionAttachments, setForeignAttribute, setForeignAttributes
public static final int LR
public static final int RL
public static final int TB
public static final int BT
public static final int ORIENT_0
public static final int ORIENT_90
public static final int ORIENT_180
public static final int ORIENT_270
public static final int CLASS_NORMAL
public static final int CLASS_FIXED
public static final int CLASS_ABSOLUTE
public static final int CLASS_BEFORE_FLOAT
public static final int CLASS_FOOTNOTE
public static final int CLASS_SIDE_FLOAT
public static final int CLASS_MAX
protected int ipd
protected int bpd
protected java.util.Map props
protected static org.apache.commons.logging.Log log
public int getAreaClass()
public void setAreaClass(int areaClass)
areaClass
- the area classpublic void setIPD(int ipd)
ipd
- the new inline progression dimensionpublic int getIPD()
public void setBPD(int bpd)
bpd
- the new block progression dimensionpublic int getBPD()
public int getAllocIPD()
public int getAllocBPD()
public int getBorderAndPaddingWidthBefore()
public int getBorderAndPaddingWidthAfter()
public int getBorderAndPaddingWidthStart()
public int getBorderAndPaddingWidthEnd()
public int getSpaceBefore()
public int getSpaceAfter()
public int getSpaceStart()
public int getSpaceEnd()
public void addChildArea(Area child)
child
- the child area to addpublic void addTrait(java.lang.Object traitCode, java.lang.Object prop)
traitCode
- the trait keyprop
- the value of the traitpublic java.util.Map getTraits()
public boolean hasTraits()
public java.lang.Object getTrait(java.lang.Object oTraitCode)
oTraitCode
- the trait keypublic boolean hasTrait(java.lang.Object oTraitCode)
oTraitCode
- the trait keypublic boolean getTraitAsBoolean(java.lang.Object oTraitCode)
oTraitCode
- the trait keypublic int getTraitAsInteger(java.lang.Object oTraitCode)
oTraitCode
- the trait keypublic java.lang.String toString()
toString
in class java.lang.Object
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.