Package org.apache.fop.area.inline
Class InlineParent
- java.lang.Object
-
- org.apache.fop.area.AreaTreeObject
-
- org.apache.fop.area.Area
-
- org.apache.fop.area.inline.InlineArea
-
- org.apache.fop.area.inline.InlineParent
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
AbstractTextArea
,BasicLinkArea
,FilledArea
,InlineBlock
public class InlineParent extends InlineArea
Inline parent area. This is an inline area that can have other inlines as children.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.fop.area.inline.InlineArea
InlineArea.InlineAdjustingInfo
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
autoSize
Controls whether the IPD is automatically adjusted based on the area's children.protected java.util.List<InlineArea>
inlines
The list of inline areas added to this inline parent.private int
maxAfterEdge
The offset of the afterest child area of this area.protected int
minChildOffset
The offset of the beforest child area of this area.private static long
serialVersionUID
-
Fields inherited from class org.apache.fop.area.inline.InlineArea
adjustingInfo, blockProgressionOffset
-
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, traits
-
Fields inherited from class org.apache.fop.area.AreaTreeObject
extensionAttachments, foreignAttributes
-
-
Constructor Summary
Constructors Constructor Description InlineParent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChildArea(Area c)
Set the parent for the child area.boolean
applyVariationFactor(double variationFactor, int lineStretch, int lineShrink)
recursively apply the variation factor to all descendant areasjava.util.List
collectInlineRuns(java.util.List runs)
Collection bidi inline runs.java.util.List<InlineArea>
getChildAreas()
Get the child areas for this inline parent.(package private) int
getVirtualBPD()
Returns the block-progression-dimension that this area would have if it were taking its children elements into account.(package private) int
getVirtualOffset()
Returns the offset that this area would have if its offset and size were taking children areas into account.private void
readObject(java.io.ObjectInputStream ois)
void
resetChildrenLevel()
Reset bidirectionality level of all children to default (-1), signalling that they will inherit the level of their parent text area.private void
updateLevel(int newLevel)
-
Methods inherited from class org.apache.fop.area.inline.InlineArea
getAdjustingInfo, getBlockProgressionOffset, getParentArea, handleIPDVariation, hasLineThrough, hasOverline, hasUnderline, increaseIPD, isAncestor, isAncestorOrSelf, isBlinking, notifyIPDVariation, setAdjustingInfo, setAdjustingInfo, setAdjustment, setBlockProgressionOffset, setParentArea
-
Methods inherited from class org.apache.fop.area.Area
activateEffectiveIPD, addTrait, clone, getAllocBPD, getAllocIPD, getAreaClass, getBidiLevel, getBorderAndPaddingWidthAfter, getBorderAndPaddingWidthBefore, getBorderAndPaddingWidthEnd, getBorderAndPaddingWidthStart, getBPD, getChangeBarList, getEffectiveAllocIPD, getEffectiveIPD, getIPD, getSpaceAfter, getSpaceBefore, getSpaceEnd, getSpaceStart, getTrait, getTraitAsBoolean, getTraitAsInteger, getTraits, hasTrait, hasTraits, resetBidiLevel, setAreaClass, setBidiLevel, setBPD, setChangeBarList, setIPD, setTraits, setWritingModeTraits, toString
-
Methods inherited from class org.apache.fop.area.AreaTreeObject
addExtensionAttachment, getExtensionAttachments, getForeignAttributes, getForeignAttributeValue, hasExtensionAttachments, setExtensionAttachments, setForeignAttribute, setForeignAttributes
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
inlines
protected java.util.List<InlineArea> inlines
The list of inline areas added to this inline parent.
-
autoSize
protected transient boolean autoSize
Controls whether the IPD is automatically adjusted based on the area's children.
-
minChildOffset
protected int minChildOffset
The offset of the beforest child area of this area.
-
maxAfterEdge
private int maxAfterEdge
The offset of the afterest child area of this area. Offset from the before-edge of this area's content-rectangle and the after-edge of the child area's allocation-rectangle.
-
-
Method Detail
-
readObject
private void readObject(java.io.ObjectInputStream ois) throws java.lang.ClassNotFoundException, java.io.IOException
- Throws:
java.lang.ClassNotFoundException
java.io.IOException
-
addChildArea
public void addChildArea(Area c)
Description copied from class:InlineArea
Set the parent for the child area. 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:
addChildArea
in classInlineArea
- Parameters:
c
- the child area to add
-
getVirtualOffset
int getVirtualOffset()
Description copied from class:InlineArea
Returns the offset that this area would have if its offset and size were taking children areas into account. The bpd of an inline area is taken from its nominal font and doesn't depend on the bpds of its children elements. However, in the case of a basic-link element we want the active area to cover all of the children elements.- Overrides:
getVirtualOffset
in classInlineArea
- Returns:
- the offset that this area would have if the before-edge of its content-rectangle were coinciding with the beforest before-edge of its children allocation-rectangles.
- See Also:
InlineArea.getVirtualBPD()
,BasicLinkArea
-
getVirtualBPD
int getVirtualBPD()
Description copied from class:InlineArea
Returns the block-progression-dimension that this area would have if it were taking its children elements into account. See InlineArea.getVirtualOffset().- Overrides:
getVirtualBPD
in classInlineArea
- Returns:
- the bpd
-
getChildAreas
public java.util.List<InlineArea> getChildAreas()
Get the child areas for this inline parent.- Returns:
- the list of child areas
-
applyVariationFactor
public boolean applyVariationFactor(double variationFactor, int lineStretch, int lineShrink)
recursively apply the variation factor to all descendant areas- Overrides:
applyVariationFactor
in classInlineArea
- Parameters:
variationFactor
- the variation factor that must be applied to adjustmentslineStretch
- the total stretch of the linelineShrink
- the total shrink of the line- Returns:
- true if there is an UnresolvedArea descendant
-
collectInlineRuns
public java.util.List collectInlineRuns(java.util.List runs)
Description copied from class:InlineArea
Collection bidi inline runs.- Overrides:
collectInlineRuns
in classInlineArea
- Parameters:
runs
- current list of inline runs- Returns:
- modified list of inline runs, having appended new run
-
resetChildrenLevel
public void resetChildrenLevel()
Reset bidirectionality level of all children to default (-1), signalling that they will inherit the level of their parent text area.
-
updateLevel
private void updateLevel(int newLevel)
-
-