Package org.apache.fop.area
Class BlockParent
java.lang.Object
org.apache.fop.area.AreaTreeObject
org.apache.fop.area.Area
org.apache.fop.area.BlockParent
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
BeforeFloat,Block,Footnote,NormalFlow
A BlockParent holds block-level areas.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe children of this block parent area.protected intThe x offset position of this block parent.protected intThe y offset position of this block parent.Fields inherited from class org.apache.fop.area.Area
bidiLevel, bpd, CLASS_ABSOLUTE, CLASS_BEFORE_FLOAT, CLASS_FIXED, CLASS_FOOTNOTE, CLASS_MAX, CLASS_NORMAL, CLASS_SIDE_FLOAT, effectiveIPD, ipd, log, ORIENT_0, ORIENT_180, ORIENT_270, ORIENT_90, traitsFields inherited from class org.apache.fop.area.AreaTreeObject
extensionAttachments, foreignAttributes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAdd the block area to this block parent.voidaddChildArea(Area childArea) Add a child to this area.Get the list of child areas for this block area.intintGet the X offset of this block parent area.intGet the Y offset of this block parent area.booleanisEmpty()Check whether there are child areas.voidsetXOffset(int off) Set the X offset of this block parent area.voidsetYOffset(int off) Set the Y offset of this block parent area.Methods inherited from class org.apache.fop.area.Area
addTrait, clone, getAllocBPD, getAllocIPD, getAreaClass, getBidiLevel, getBorderAndPaddingWidthAfter, getBorderAndPaddingWidthBefore, getBorderAndPaddingWidthEnd, getBorderAndPaddingWidthStart, getBPD, getChangeBarList, getEffectiveAllocIPD, getIPD, getSpaceAfter, getSpaceBefore, getSpaceEnd, getSpaceStart, getTrait, getTraitAsBoolean, getTraitAsInteger, getTraits, hasTrait, hasTraits, isFromFootnote, resetBidiLevel, setAreaClass, setBidiLevel, setBPD, setChangeBarList, setFromFootnote, setIPD, setTraits, setWritingModeTraits, toStringMethods inherited from class org.apache.fop.area.AreaTreeObject
addExtensionAttachment, getExtensionAttachments, getForeignAttributes, getForeignAttributeValue, hasExtensionAttachments, setExtensionAttachments, setForeignAttribute, setForeignAttributes
-
Field Details
-
xOffset
protected int xOffsetThe x offset position of this block parent. Used for relative (serves as left-offset trait) and absolute positioning (serves as left-position trait). -
yOffset
protected int yOffsetThe y offset position of this block parent. Used for relative (serves as top-offset trait) and absolute positioning (serves as top-position trait). -
children
The children of this block parent area.
-
-
Constructor Details
-
BlockParent
public BlockParent()
-
-
Method Details
-
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.- Overrides:
addChildAreain classArea- Parameters:
childArea- the child area to add
-
addBlock
Add the block area to this block parent.- Parameters:
block- the child block area to add
-
getChildAreas
Get the list of child areas for this block area.- Returns:
- the list of child areas
-
isEmpty
public boolean isEmpty()Check whether there are child areas.- Returns:
- the result.
-
setXOffset
public void setXOffset(int off) Set the X offset of this block parent area.- Parameters:
off- the x offset of the block parent area
-
setYOffset
public void setYOffset(int off) Set the Y offset of this block parent area.- Parameters:
off- the y offset of the block parent area
-
getXOffset
public int getXOffset()Get the X offset of this block parent area.- Returns:
- the x offset of the block parent area
-
getYOffset
public int getYOffset()Get the Y offset of this block parent area.- Returns:
- the y offset of the block parent area
-
getEffectiveIPD
public int getEffectiveIPD()- Overrides:
getEffectiveIPDin classArea
-
activateEffectiveIPD
public void activateEffectiveIPD()- Overrides:
activateEffectiveIPDin classArea
-