java.io.Serializable
BlockParent
, Container
, ForeignObject
, Image
, InlineArea
, LineArea
, MainReference
, RegionReference
, RegionViewport
, Span
public class Area extends AreaTreeObject implements java.io.Serializable
Modifier and Type | Field | Description |
---|---|---|
protected int |
bidiLevel |
Resolved bidirectional level for area.
|
protected int |
bpd |
the area's block-progression-dimension
|
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 |
effectiveIPD |
|
protected int |
ipd |
the area's inline-progression-dimension
|
protected static org.apache.commons.logging.Log |
log |
logging instance
|
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.TreeMap<java.lang.Integer,java.lang.Object> |
traits |
Traits for this area.
|
extensionAttachments, foreignAttributes
Constructor | Description |
---|---|
Area() |
Modifier and Type | Method | Description |
---|---|---|
void |
activateEffectiveIPD() |
|
void |
addChildArea(Area child) |
Add a child to this area.
|
void |
addTrait(java.lang.Integer traitCode,
java.lang.Object prop) |
Add a trait to this area.
|
java.lang.Object |
clone() |
|
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 |
getBidiLevel() |
Get the bidirectional embedding level.
|
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 |
getEffectiveAllocIPD() |
|
int |
getEffectiveIPD() |
|
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.Integer traitCode) |
Get a trait from this area.
|
boolean |
getTraitAsBoolean(java.lang.Integer traitCode) |
Get a boolean trait from this area.
|
int |
getTraitAsInteger(java.lang.Integer traitCode) |
Get a trait from this area as an integer.
|
java.util.Map<java.lang.Integer,java.lang.Object> |
getTraits() |
Get the map of all traits on this area.
|
boolean |
hasTrait(java.lang.Integer traitCode) |
Checks whether a certain trait is set on this area.
|
boolean |
hasTraits() |
|
void |
resetBidiLevel() |
Reset the bidirectional embedding level to default
value (-1).
|
void |
setAreaClass(int areaClass) |
Set the area class of this area.
|
void |
setBidiLevel(int bidiLevel) |
Set the bidirectional embedding level.
|
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.
|
void |
setTraits(java.util.Map traits) |
Set traits on this area, copying from an existing traits map.
|
void |
setWritingModeTraits(WritingModeTraitsGetter wmtg) |
Sets the writing mode traits for this area.
|
java.lang.String |
toString() |
addExtensionAttachment, getExtensionAttachments, getForeignAttributes, getForeignAttributeValue, hasExtensionAttachments, setExtensionAttachments, setForeignAttribute, setForeignAttributes
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 int effectiveIPD
protected int bidiLevel
protected java.util.TreeMap<java.lang.Integer,java.lang.Object> traits
protected static final org.apache.commons.logging.Log log
public int getAreaClass()
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AreaTreeObject
java.lang.CloneNotSupportedException
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 getEffectiveAllocIPD()
public int getAllocBPD()
public void setBidiLevel(int bidiLevel)
bidiLevel
- the bidirectional embedding levelpublic void resetBidiLevel()
public int getBidiLevel()
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.Integer traitCode, java.lang.Object prop)
traitCode
- the trait keyprop
- the value of the traitpublic void setTraits(java.util.Map traits)
traits
- the map of traitspublic java.util.Map<java.lang.Integer,java.lang.Object> getTraits()
public boolean hasTraits()
public java.lang.Object getTrait(java.lang.Integer traitCode)
traitCode
- the trait keypublic boolean hasTrait(java.lang.Integer traitCode)
traitCode
- the trait keypublic boolean getTraitAsBoolean(java.lang.Integer traitCode)
traitCode
- the trait keypublic int getTraitAsInteger(java.lang.Integer traitCode)
traitCode
- the trait keypublic void setWritingModeTraits(WritingModeTraitsGetter wmtg)
wmtg
- a WM traits getterpublic java.lang.String toString()
toString
in class java.lang.Object
public int getEffectiveIPD()
public void activateEffectiveIPD()
Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.