Package org.apache.fop.area
Class Area
java.lang.Object
org.apache.fop.area.AreaTreeObject
org.apache.fop.area.Area
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
BlockParent,Container,ForeignObject,Image,InlineArea,LineArea,MainReference,RegionReference,RegionViewport,Span
Base object for all areas.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intResolved bidirectional level for area.protected intthe area's block-progression-dimensionstatic final intAbsolute position classstatic final intBefore float classstatic final intFixed position classstatic final intFootnote classstatic final intMaximum class countstatic final intNormal classstatic final intSide float classprotected intprotected intthe area's inline-progression-dimensionprotected static final org.apache.commons.logging.Loglogging instancestatic final intNormal orientationstatic final intRotate 180 degreesstatic final intRotated 270 degrees clockwisestatic final intRotated 90 degrees clockwiseTraits for this area.Fields inherited from class org.apache.fop.area.AreaTreeObject
extensionAttachments, foreignAttributes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddChildArea(Area child) Add a child to this area.voidAdd a trait to this area.clone()intGet the allocation block progression dimension of this area.intGet the allocation inline progression dimension of this area.intGet the area class of this area.intGet the bidirectional embedding level.intReturn the sum of region border- and padding-afterintReturn the sum of region border- and padding-beforeintReturn the sum of region border- and padding-endintReturn the sum of region border- and padding-startintgetBPD()Get the block progression dimension of the content rectangle for this area.Returns the active change bar list.intintintgetIPD()Get the inline progression dimension of the content rectangle for this area.intReturns the space afterintReturns the space beforeintReturns the space endintReturns the space startGet a trait from this area.booleangetTraitAsBoolean(Integer traitCode) Get a boolean trait from this area.intgetTraitAsInteger(Integer traitCode) Get a trait from this area as an integer.Get the map of all traits on this area.booleanChecks whether a certain trait is set on this area.booleanbooleanvoidReset the bidirectional embedding level to default value (-1).voidsetAreaClass(int areaClass) Set the area class of this area.voidsetBidiLevel(int bidiLevel) Set the bidirectional embedding level.voidsetBPD(int bpd) Set the block progression dimension of the content rectangle for this area.voidsetChangeBarList(List<ChangeBar> changeBarList) Sets the active change bar list.voidsetFromFootnote(boolean fromFootnote) voidsetIPD(int ipd) Set the inline progression dimension of content rectangle for this area.voidSet traits on this area, copying from an existing traits map.voidSets the writing mode traits for this area.toString()Methods inherited from class org.apache.fop.area.AreaTreeObject
addExtensionAttachment, getExtensionAttachments, getForeignAttributes, getForeignAttributeValue, hasExtensionAttachments, setExtensionAttachments, setForeignAttribute, setForeignAttributes
-
Field Details
-
ORIENT_0
public static final int ORIENT_0Normal orientation- See Also:
-
ORIENT_90
public static final int ORIENT_90Rotated 90 degrees clockwise- See Also:
-
ORIENT_180
public static final int ORIENT_180Rotate 180 degrees- See Also:
-
ORIENT_270
public static final int ORIENT_270Rotated 270 degrees clockwise- See Also:
-
CLASS_NORMAL
public static final int CLASS_NORMALNormal class- See Also:
-
CLASS_FIXED
public static final int CLASS_FIXEDFixed position class- See Also:
-
CLASS_ABSOLUTE
public static final int CLASS_ABSOLUTEAbsolute position class- See Also:
-
CLASS_BEFORE_FLOAT
public static final int CLASS_BEFORE_FLOATBefore float class- See Also:
-
CLASS_FOOTNOTE
public static final int CLASS_FOOTNOTEFootnote class- See Also:
-
CLASS_SIDE_FLOAT
public static final int CLASS_SIDE_FLOATSide float class- See Also:
-
CLASS_MAX
public static final int CLASS_MAXMaximum class count- See Also:
-
ipd
protected int ipdthe area's inline-progression-dimension -
bpd
protected int bpdthe area's block-progression-dimension -
effectiveIPD
protected int effectiveIPD -
bidiLevel
protected int bidiLevelResolved bidirectional level for area. -
traits
Traits for this area. -
log
protected static final org.apache.commons.logging.Log loglogging instance
-
-
Constructor Details
-
Area
public Area()
-
-
Method Details
-
getChangeBarList
Returns the active change bar list.- Returns:
- The active change bar list
-
setChangeBarList
Sets the active change bar list.- Parameters:
changeBarList- The active change bar list
-
getAreaClass
public int getAreaClass()Get the area class of this area.- Returns:
- the area class
-
clone
- Overrides:
clonein classAreaTreeObject- Throws:
CloneNotSupportedException
-
setAreaClass
public void setAreaClass(int areaClass) Set the area class of this area.- Parameters:
areaClass- the area class
-
setIPD
public void setIPD(int ipd) Set the inline progression dimension of content rectangle for this area.- Parameters:
ipd- the new inline progression dimension- See Also:
-
getIPD
public int getIPD()Get the inline progression dimension of the content rectangle for this area.- Returns:
- the inline progression dimension
- See Also:
-
setBPD
public void setBPD(int bpd) Set the block progression dimension of the content rectangle for this area.- Parameters:
bpd- the new block progression dimension- See Also:
-
getBPD
public int getBPD()Get the block progression dimension of the content rectangle for this area.- Returns:
- the block progression dimension
- See Also:
-
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.- Returns:
- the total IPD allocation for this area
-
getEffectiveAllocIPD
public int getEffectiveAllocIPD() -
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.- Returns:
- the total BPD allocation for this area
-
setBidiLevel
public void setBidiLevel(int bidiLevel) Set the bidirectional embedding level.- Parameters:
bidiLevel- the bidirectional embedding level
-
resetBidiLevel
public void resetBidiLevel()Reset the bidirectional embedding level to default value (-1). -
getBidiLevel
public int getBidiLevel()Get the bidirectional embedding level.- Returns:
- the bidirectional embedding level
-
getBorderAndPaddingWidthBefore
public int getBorderAndPaddingWidthBefore()Return the sum of region border- and padding-before- Returns:
- width in millipoints
-
getBorderAndPaddingWidthAfter
public int getBorderAndPaddingWidthAfter()Return the sum of region border- and padding-after- Returns:
- width in millipoints
-
getBorderAndPaddingWidthStart
public int getBorderAndPaddingWidthStart()Return the sum of region border- and padding-start- Returns:
- width in millipoints
-
getBorderAndPaddingWidthEnd
public int getBorderAndPaddingWidthEnd()Return the sum of region border- and padding-end- Returns:
- width in millipoints
-
getSpaceBefore
public int getSpaceBefore()Returns the space before- Returns:
- width in millipoints
-
getSpaceAfter
public int getSpaceAfter()Returns the space after- Returns:
- width in millipoints
-
getSpaceStart
public int getSpaceStart()Returns the space start- Returns:
- width in millipoints
-
getSpaceEnd
public int getSpaceEnd()Returns the space end- Returns:
- width in millipoints
-
addChildArea
Add a child to this area. The default is to do nothing. Subclasses must override to do something if they can have child areas.- Parameters:
child- the child area to add
-
addTrait
Add a trait to this area.- Parameters:
traitCode- the trait keyprop- the value of the trait
-
setTraits
Set traits on this area, copying from an existing traits map.- Parameters:
traits- the map of traits
-
getTraits
Get the map of all traits on this area.- Returns:
- the map of traits
-
hasTraits
public boolean hasTraits()- Returns:
- true if the area has traits
-
getTrait
Get a trait from this area.- Parameters:
traitCode- the trait key- Returns:
- the trait value
-
hasTrait
Checks whether a certain trait is set on this area.- Parameters:
traitCode- the trait key- Returns:
- true if the trait is set
-
getTraitAsBoolean
Get a boolean trait from this area.- Parameters:
traitCode- the trait key- Returns:
- the trait value
-
getTraitAsInteger
Get a trait from this area as an integer.- Parameters:
traitCode- the trait key- Returns:
- the trait value
-
setWritingModeTraits
Sets the writing mode traits for this area. Default implementation does nothing.- Parameters:
wmtg- a WM traits getter
-
toString
-
getEffectiveIPD
public int getEffectiveIPD() -
activateEffectiveIPD
public void activateEffectiveIPD() -
isFromFootnote
public boolean isFromFootnote() -
setFromFootnote
public void setFromFootnote(boolean fromFootnote)
-