Package org.apache.fop.area.inline
Class UnresolvedPageNumber
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
org.apache.fop.area.inline.AbstractTextArea
org.apache.fop.area.inline.TextArea
org.apache.fop.area.inline.UnresolvedPageNumber
- All Implemented Interfaces:
Serializable
,Cloneable
,Resolvable
Unresolvable page number area.
This is a word area that resolves itself to a page number
from an id reference.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.fop.area.inline.AbstractTextArea
AbstractTextArea.TextAdjustingInfo
Nested classes/interfaces inherited from class org.apache.fop.area.inline.InlineArea
InlineArea.InlineAdjustingInfo
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
Indicates that the reference refers to the first area generated by a formatting object.static final boolean
Indicates that the reference refers to the last area generated by a formatting object.Fields inherited from class org.apache.fop.area.inline.InlineParent
autoSize, inlines, minChildOffset
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
ConstructorDescriptionUnresolvedPageNumber
(String id, Font f) Create a new unresolved page number.UnresolvedPageNumber
(String id, Font f, boolean type) Create a new unresolved page number. -
Method Summary
Modifier and TypeMethodDescriptionboolean
applyVariationFactor
(double variationFactor, int lineStretch, int lineShrink) recursively apply the variation factor to all descendant areascollectInlineRuns
(List runs) Collection bidi inline runs.String[]
Get the id references for this area.getText()
Get the (resolved or unresolved) text.boolean
Check if this is resolved.void
resolveIDRef
(String id, List<PageViewport> pages) Resolve the page number idref This resolves the idref for this object by getting the page number string from the first page in the list of pages that apply for this ID.Methods inherited from class org.apache.fop.area.inline.TextArea
addSpace, addWord, addWord, addWord, addWord, getEffectiveIPD, isHyphenated, removeText, setHyphenated, toString, updateLevel
Methods inherited from class org.apache.fop.area.inline.AbstractTextArea
getBaselineOffset, getTextLetterSpaceAdjust, getTextWordSpaceAdjust, setBaselineOffset, setSpaceDifference, setTextLetterSpaceAdjust, setTextWordSpaceAdjust
Methods inherited from class org.apache.fop.area.inline.InlineParent
addChildArea, getChildAreas, resetChildrenLevel
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, getIPD, getSpaceAfter, getSpaceBefore, getSpaceEnd, getSpaceStart, getTrait, getTraitAsBoolean, getTraitAsInteger, getTraits, hasTrait, hasTraits, resetBidiLevel, setAreaClass, setBidiLevel, setBPD, setChangeBarList, setIPD, setTraits, setWritingModeTraits
Methods inherited from class org.apache.fop.area.AreaTreeObject
addExtensionAttachment, getExtensionAttachments, getForeignAttributes, getForeignAttributeValue, hasExtensionAttachments, setExtensionAttachments, setForeignAttribute, setForeignAttributes
-
Field Details
-
FIRST
public static final boolean FIRSTIndicates that the reference refers to the first area generated by a formatting object.- See Also:
-
LAST
public static final boolean LASTIndicates that the reference refers to the last area generated by a formatting object.- See Also:
-
-
Constructor Details
-
UnresolvedPageNumber
public UnresolvedPageNumber() -
UnresolvedPageNumber
Create a new unresolved page number.- Parameters:
id
- the id reference for resolving thisf
- the font for formatting the page number
-
UnresolvedPageNumber
Create a new unresolved page number.- Parameters:
id
- the id reference for resolving thisf
- the font for formatting the page numbertype
- indicates whether the reference refers to the first or last area generated by a formatting object
-
-
Method Details
-
getIDRefs
Get the id references for this area.- Specified by:
getIDRefs
in interfaceResolvable
- Returns:
- the id reference for this unresolved page number
-
getText
Get the (resolved or unresolved) text. -
resolveIDRef
Resolve the page number idref This resolves the idref for this object by getting the page number string from the first page in the list of pages that apply for this ID. The page number text is then set to the String value of the page number. TODO: [GA] May need to run bidi algorithm and script processor on resolved page number.- Specified by:
resolveIDRef
in interfaceResolvable
- Parameters:
id
- an id whose PageViewports have been determinedpages
- the list of PageViewports associated with this ID
-
isResolved
public boolean isResolved()Check if this is resolved.- Specified by:
isResolved
in interfaceResolvable
- Returns:
- true when this has been resolved
-
applyVariationFactor
public boolean applyVariationFactor(double variationFactor, int lineStretch, int lineShrink) recursively apply the variation factor to all descendant areas- Overrides:
applyVariationFactor
in classAbstractTextArea
- Parameters:
variationFactor
- the variation factor that must be applied to adjustment ratioslineStretch
- the total stretch of the linelineShrink
- the total shrink of the line- Returns:
- true if there is an UnresolvedArea descendant
-
collectInlineRuns
Collection bidi inline runs. Override of @{link InlineParent} implementation. N.B. [GA] without this override, the page-number-citation_writing_mode_rl layout engine test will fail. It may be that the test needs to be updated rather than using this override.- Overrides:
collectInlineRuns
in classInlineParent
- Parameters:
runs
- current list of inline runs- Returns:
- modified list of inline runs, having appended new run
-