|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.common.AbstractOrderedTreeNode
org.foray.area.AreaNode
org.foray.area.Area
org.foray.area.AreaFlexible
org.foray.area.BlockArea
org.foray.area.LineArea
public final class LineArea
Area containing a line of content on the page.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.foray.common.AbstractOrderedTreeNode |
---|
AbstractOrderedTreeNode.PostOrderDescendantIterator |
Method Summary | |
---|---|
protected int |
alignmentAdjustment()
Computes the amount that the start-edge of the line-area's content-rectangle should be adjusted when rendering. |
int |
alignmentPointOffset()
Provides the number which would, when added to the before-edge of the line-area in the block-progression-dimension, produce the alignment-point for text on this line. |
int |
alignmentPointY()
Computes the y axis of the alignment point for this line. |
LineArea |
ancestorLineArea()
Returns the ancestor LineArea, if any. |
int |
capacityRemaining()
|
int |
capacityTotal()
|
int |
capacityUsed()
|
void |
cleanup()
This method should be called before a LineArea is discarded to clean up dependencies between nodes in the tree. |
int |
computeInitialPD()
Initialize the progression dimension for this Area. |
org.axsl.common.value.RelativeAxis |
contentStackingAxis()
Returns the content stacking axis for this area. |
int |
crBpd()
|
String |
getAreaName()
|
List<AbstractInlineArea> |
getChildren()
Return the List of this node's children. |
FOLinkage |
getLinkage()
Returns the raw "generated by" instance. |
Area |
getOverflowArea(Area childRequesting)
This method is used by child Areas to ask the parent Area into which Area the child Area's overflow should be placed. |
NormalBlockArea |
getParent()
|
org.axsl.font.FontUse |
getPrimaryFont()
Returns the primary font. |
int |
getProgressionDimension()
Returns the actual total value, in millipoints, of the size of this area (not counting space-before, etc.) in its progression direction. |
boolean |
hasAnyContent()
|
void |
incrementProgressionDimension(int incrementAmount)
Change the progression-dimension used by this Area. |
void |
initializeAnteriorSpace()
Computes the initial value of anteriorSpace for this Area. |
boolean |
isFirstLineAreaInBlock()
Indicates whether this is the first line-area generated by the parent block. |
boolean |
isLastLineAreaInBlock()
Indicates whether this is the last line-area generated by the parent block. |
void |
lineContentChanged()
Tell the LineArea that its content has changed, so that it can make any adjustments it thinks are necessary. |
int |
lineContentLengthUsed()
Computes the total IPD used by the children on this line. |
BasicLinkArea |
makeBasicLinkArea(org.axsl.fo.fo.BasicLink basicLink,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
BidiOverrideArea |
makeBidiOverrideArea(org.axsl.fo.fo.BidiOverride bidiOverride,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
ExternalGraphicArea |
makeExternalGraphicArea(org.axsl.fo.fo.ExternalGraphic ifo,
int ipd,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
ForeignObjectArea |
makeForeignObjectArea(org.axsl.fo.fo.InstreamForeignObject ifo,
int ipd,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
TextArea |
makeGlyphAreaSequence(org.axsl.fo.fo.CharacterSequence foText,
int startOffset,
int sizeInChars,
int ipd,
boolean hasDiscretionaryHyphen,
boolean hasFauxSmallCaps,
boolean isLastItemOnLine,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
IndexPageCitationListArea |
makeIndexPageCitationListArea(org.axsl.fo.fo.IndexPageCitationList indexPcl,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
InlineArea |
makeInlineArea(org.axsl.fo.fo.Inline inline,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
InlineContainerArea |
makeInlineContainerArea(org.axsl.fo.fo.InlineContainer inlineContainer,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
LeaderArea |
makeLeaderArea(org.axsl.fo.fo.Leader leader,
int ipd,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
PageNumberArea |
makePageNumberArea(org.axsl.fo.fo.PageNumber pageNumber,
int ipd,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
PageNumberCitationArea |
makePageNumberCitationArea(org.axsl.fo.fo.PageNumberCitation citation,
int ipd,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
PageNumberCitationLastArea |
makePageNumberCitationLastArea(org.axsl.fo.fo.PageNumberCitationLast citation,
int ipd,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
ScalingValueCitationArea |
makeScalingValueCitationArea(org.axsl.fo.fo.ScalingValueCitation citation,
int ipd,
org.axsl.fo.fo.GraftingPoint graftingPoint)
|
int |
offsetFromStart()
Returns the offset from the start of this area at which the line content should actually be rendered. |
boolean |
optimize()
This method should be run after layout is complete, allowing cleanup and adjustments that do not affect the placement of the areas to be computed before the page is rendered. |
int |
pdAvailable()
LineArea uses this method uniquely. |
void |
render(org.axsl.galley.RenderVisitor visitor)
|
protected void |
resetChildren()
Removes the references to the child nodes from this Area. |
void |
setParent(AreaNode node)
Sets the parent node. |
void |
setProgressionDimension(int progressionDimension)
Sets the progression-dimension used by this Area. |
int |
startAlignmentAdjustment()
Computes the adjustment to the starting offset that results from alignment. |
boolean |
textAlignLastApplies()
Tests for the specialized case of a line qualifying for text-align-last to apply to it. |
int |
totalAlignmentAdjustment()
Computes the difference between the space available on the line and the amount of space actually used. |
int |
traitBorderAfterWidth()
Returns the border-after-width trait for this area. |
int |
traitBorderBeforeWidth()
Returns the border-before-width trait for this area. |
int |
traitBorderEndWidth()
Returns the border-end-width trait for this area. |
int |
traitBorderStartWidth()
Returns the border-start-width trait for this area. |
int |
traitEndIndent()
Returns the end-indent trait. |
int |
traitFontSize()
Returns the font-size trait. |
org.axsl.fo.fo.Block |
traitGeneratedBy()
|
int |
traitIPDimensionOpt()
Return the optimum IP dimension for this area. |
int |
traitLastLineEndIndent()
Returns the last-line end-indent value for this line. |
int |
traitPaddingAfter()
Returns the padding-after trait for this area. |
int |
traitPaddingBefore()
Returns the padding-before trait for this area. |
int |
traitPaddingEnd()
Returns the padding-end trait for this area. |
int |
traitPaddingStart()
Returns the padding-start trait for this area. |
org.axsl.common.value.Conditionality |
traitSpaceAfterConditionality()
Returns the space-after conditionality for this area. |
int |
traitSpaceAfterMaximum()
Returns the space-after maximum trait for this area. |
int |
traitSpaceAfterMinumum()
Returns the space-after minimum trait for this area. |
int |
traitSpaceAfterOptimum()
Returns the space-after optimum trait for this area. |
int |
traitSpaceAfterPrecedence()
Returns the space-after precedence for this area. |
org.axsl.common.value.Conditionality |
traitSpaceBeforeConditionality()
Returns the space-before conditionality for this area. |
int |
traitSpaceBeforeMaximum()
Returns the space-before maximum trait for this area. |
int |
traitSpaceBeforeMinimum()
Returns the space-before minimum trait for this area. |
int |
traitSpaceBeforeOptimum()
Returns the space-before optimum trait for this area. |
int |
traitSpaceBeforePrecedence()
Returns the space-before precedence for this area. |
int |
traitSpaceEndOptimum()
Returns the space-end optimum trait for this area. |
int |
traitSpaceStartOptimum()
Returns the space-start optimum trait for this area. |
int |
traitStartIndent()
Returns the start-indent trait. |
org.axsl.common.value.TextAlign |
traitTextAlign()
Returns the effective text alignment value for this line. |
int |
traitTextIndent()
Returns the text-indent value for this line. |
org.axsl.common.value.WhiteSpaceTreatment |
traitWhiteSpaceTreatment()
Returns the whitespace-treatment trait for this area. |
void |
verticalAlign()
Balance (vertically) the inline areas within this line. |
Methods inherited from class org.foray.area.BlockArea |
---|
crIpd, crOriginIPDOffset, isAbsolutelyPositioned, traitHalfLeadingMax, traitHalfLeadingMin, traitHalfLeadingOpt, traitLineStackingStrategy |
Methods inherited from class org.foray.area.AreaFlexible |
---|
crIPDBlockArea, crOriginBPDOffset, getAnteriorSpace, incrementAnteriorSpace, incrementParentPD, pdUsedBySiblings, removeChild, setAnteriorSpace, setMinimumProgressionDimension, setParentPD, usedProgressionDimension, usedProgressionDimensionNormalFlow |
Methods inherited from class org.foray.common.AbstractOrderedTreeNode |
---|
children, getChildCount, getFirstLeaf, getIndex, getLastLeaf, getLevel, getNextLeaf, getNextSibling, getPreviousLeaf, getPreviousSibling, getSharedAncestor, hasChildren, isLeaf, isNodeAncestor, isNodeDescendant, nextPostOrderNode, nextPreOrderNode, postOrderDescendantIterator, siblingIndex |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.axsl.galley.Area |
---|
brBpd, brIpd, brOriginX, brOriginY, crIpd, crOriginX, crOriginY, destinationName, generatedByExists, generatedByName, isLinkRoot, linkDestination, linkType, traitId |
Methods inherited from interface org.axsl.galley.AreaNode |
---|
getChildAt, getGalley |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Methods inherited from interface org.axsl.area.Area |
---|
crIpd |
Methods inherited from interface org.axsl.area.AreaNode |
---|
ancestorArea, ancestorBlockContentFactory, ancestorNormalBlockArea, ancestorTableArea, getAreaTree, getPage, isFirstChildOfGeneratedBy, nearestArea, nearestGeneratedByBlockLevelFo, removeChild, siblingIndex |
Methods inherited from interface javax.swing.tree.TreeNode |
---|
children, getAllowsChildren, getChildCount, getIndex, isLeaf |
Methods inherited from interface org.axsl.fo.FoContext |
---|
bpdAncestorBlockOrRa, getGraftingPoint, heightContainingBlock, ipdAncestorBlockArea, ipdAncestorBlockOrRa, ipdContainingRefArea, ipdParentArea, isFirst, isLast, tableWidth, widthContainingBlock |
Method Detail |
---|
protected int alignmentAdjustment()
public boolean optimize()
PageRA.layoutComplete()
.
Resolves and optimizes the line. Specifically, this method resolves any
page-number citations, and then adjusts leaders, letter-spacing, and
word-spacing to justify the line if that is neeeded.
optimize
in class AreaNode
public void verticalAlign()
public boolean isFirstLineAreaInBlock()
public boolean isLastLineAreaInBlock()
public boolean textAlignLastApplies()
public int offsetFromStart()
public int totalAlignmentAdjustment()
public int startAlignmentAdjustment()
public org.axsl.common.value.RelativeAxis contentStackingAxis()
contentStackingAxis
in class Area
RelativeAxis.BLOCK_PROGRESSION
or
RelativeAxis.INLINE_PROGRESSION
, depending on whether the
contents of this area stack in the block-progression-direction or the
inline-progression-direction.
The default value is that contents stack in the BPD. Classes that
stack in the IPD should override this method.public int pdAvailable()
pdAvailable
in interface org.axsl.area.Area
pdAvailable
in class AreaFlexible
public int lineContentLengthUsed()
public Area getOverflowArea(Area childRequesting) throws org.axsl.area.AreaTreeException
Area
getOverflowArea
in class Area
childRequesting
- Child Areas ask
org.axsl.area.AreaTreeException
- If the Area is unable to find or create the
overflow area.public int alignmentPointOffset()
public int alignmentPointY()
public int traitBorderBeforeWidth()
traitBorderBeforeWidth
in class Area
public int traitBorderAfterWidth()
traitBorderAfterWidth
in class Area
public int traitBorderStartWidth()
traitBorderStartWidth
in class Area
public int traitBorderEndWidth()
traitBorderEndWidth
in class Area
public int traitPaddingBefore()
traitPaddingBefore
in class Area
public int traitPaddingAfter()
traitPaddingAfter
in class Area
public int traitPaddingStart()
traitPaddingStart
in class Area
public int traitPaddingEnd()
traitPaddingEnd
in class Area
public void cleanup()
public org.axsl.common.value.TextAlign traitTextAlign()
TextAlign.INSIDE
and
TextAlign.OUTSIDE
, converting them, as appropriate, to the one of
the cardinal values (START, END, CENTER, JUSTIFY).
public int traitTextIndent()
public int traitLastLineEndIndent()
public int traitStartIndent()
Area
traitStartIndent
in class Area
public int traitEndIndent()
Area
traitEndIndent
in class Area
public LineArea ancestorLineArea()
ancestorLineArea
in class AreaNode
public int capacityTotal()
capacityTotal
in interface org.axsl.text.line.LineOutput
public int capacityUsed()
capacityUsed
in interface org.axsl.text.line.LineOutput
public int capacityRemaining()
capacityRemaining
in interface org.axsl.text.line.LineOutput
public boolean hasAnyContent()
hasAnyContent
in interface org.axsl.text.line.LineOutput
public BidiOverrideArea makeBidiOverrideArea(org.axsl.fo.fo.BidiOverride bidiOverride, org.axsl.fo.fo.GraftingPoint graftingPoint)
makeBidiOverrideArea
in interface org.axsl.area.LineContentFactory
public TextArea makeGlyphAreaSequence(org.axsl.fo.fo.CharacterSequence foText, int startOffset, int sizeInChars, int ipd, boolean hasDiscretionaryHyphen, boolean hasFauxSmallCaps, boolean isLastItemOnLine, org.axsl.fo.fo.GraftingPoint graftingPoint)
makeGlyphAreaSequence
in interface org.axsl.area.LineContentFactory
public ExternalGraphicArea makeExternalGraphicArea(org.axsl.fo.fo.ExternalGraphic ifo, int ipd, org.axsl.fo.fo.GraftingPoint graftingPoint)
makeExternalGraphicArea
in interface org.axsl.area.LineContentFactory
public ForeignObjectArea makeForeignObjectArea(org.axsl.fo.fo.InstreamForeignObject ifo, int ipd, org.axsl.fo.fo.GraftingPoint graftingPoint)
makeForeignObjectArea
in interface org.axsl.area.LineContentFactory
public InlineArea makeInlineArea(org.axsl.fo.fo.Inline inline, org.axsl.fo.fo.GraftingPoint graftingPoint)
makeInlineArea
in interface org.axsl.area.LineContentFactory
public InlineContainerArea makeInlineContainerArea(org.axsl.fo.fo.InlineContainer inlineContainer, org.axsl.fo.fo.GraftingPoint graftingPoint)
makeInlineContainerArea
in interface org.axsl.area.LineContentFactory
public LeaderArea makeLeaderArea(org.axsl.fo.fo.Leader leader, int ipd, org.axsl.fo.fo.GraftingPoint graftingPoint) throws org.axsl.area.AreaTreeException
makeLeaderArea
in interface org.axsl.area.LineContentFactory
org.axsl.area.AreaTreeException
public PageNumberArea makePageNumberArea(org.axsl.fo.fo.PageNumber pageNumber, int ipd, org.axsl.fo.fo.GraftingPoint graftingPoint)
makePageNumberArea
in interface org.axsl.area.LineContentFactory
public PageNumberCitationArea makePageNumberCitationArea(org.axsl.fo.fo.PageNumberCitation citation, int ipd, org.axsl.fo.fo.GraftingPoint graftingPoint)
makePageNumberCitationArea
in interface org.axsl.area.LineContentFactory
public PageNumberCitationLastArea makePageNumberCitationLastArea(org.axsl.fo.fo.PageNumberCitationLast citation, int ipd, org.axsl.fo.fo.GraftingPoint graftingPoint)
makePageNumberCitationLastArea
in interface org.axsl.area.LineContentFactory
public ScalingValueCitationArea makeScalingValueCitationArea(org.axsl.fo.fo.ScalingValueCitation citation, int ipd, org.axsl.fo.fo.GraftingPoint graftingPoint)
makeScalingValueCitationArea
in interface org.axsl.area.LineContentFactory
public BasicLinkArea makeBasicLinkArea(org.axsl.fo.fo.BasicLink basicLink, org.axsl.fo.fo.GraftingPoint graftingPoint)
makeBasicLinkArea
in interface org.axsl.area.LineContentFactory
public IndexPageCitationListArea makeIndexPageCitationListArea(org.axsl.fo.fo.IndexPageCitationList indexPcl, org.axsl.fo.fo.GraftingPoint graftingPoint)
makeIndexPageCitationListArea
in interface org.axsl.area.LineContentFactory
public int traitSpaceBeforeMinimum()
public int traitSpaceBeforeOptimum()
Area
traitSpaceBeforeOptimum
in class Area
public int traitSpaceBeforeMaximum()
public org.axsl.common.value.Conditionality traitSpaceBeforeConditionality()
public int traitSpaceBeforePrecedence()
public int traitSpaceAfterMinumum()
public int traitSpaceAfterOptimum()
Area
traitSpaceAfterOptimum
in class Area
public int traitSpaceAfterMaximum()
public org.axsl.common.value.Conditionality traitSpaceAfterConditionality()
public int traitSpaceAfterPrecedence()
public String getAreaName()
getAreaName
in interface org.axsl.area.AreaNode
public void render(org.axsl.galley.RenderVisitor visitor) throws org.axsl.galley.GalleyVisitorException
org.axsl.galley.GalleyVisitorException
public void lineContentChanged()
public int crBpd()
crBpd
in interface org.axsl.area.Area
crBpd
in class Area
public NormalBlockArea getParent()
getParent
in interface TreeNode
getParent
in class AreaNode
public void setParent(AreaNode node) throws org.axsl.area.AreaTreeException
AreaNode
setParent
in class AreaNode
node
- The new parent node.
org.axsl.area.AreaTreeException
- If the parent node is not compatible with
the implementations specification for a parent node.public List<AbstractInlineArea> getChildren()
AbstractOrderedTreeNode
getChildren
in class AreaNode
protected void resetChildren()
public void setProgressionDimension(int progressionDimension)
Area
setProgressionDimension
in class Area
progressionDimension
- The new progression-dimension value for this
Area.public void incrementProgressionDimension(int incrementAmount)
Area
incrementProgressionDimension
in class Area
incrementAmount
- The amount by which the progression-dimension
should be changed for this area.
Positive values increase the progression-dimension, negative values
decrease it.public int getProgressionDimension()
Area
Returns the actual total value, in millipoints, of the size of this area (not counting space-before, etc.) in its progression direction. This value does not include space-before, etc., but does include borders and padding. For block areas, the progression dimension is the block-progression-dimension. For inline areas, it is the inline-progression-dimension.
getProgressionDimension
in class Area
public FOLinkage getLinkage()
AreaNode
getLinkage
in class AreaNode
public org.axsl.fo.fo.Block traitGeneratedBy()
traitGeneratedBy
in interface org.axsl.area.AreaNode
traitGeneratedBy
in class BlockArea
public int computeInitialPD()
AreaFlexible
computeInitialPD
in class AreaFlexible
public void initializeAnteriorSpace()
AreaFlexible
initializeAnteriorSpace
in class AreaFlexible
public int traitSpaceStartOptimum()
Area
traitSpaceStartOptimum
in class Area
public int traitSpaceEndOptimum()
Area
traitSpaceEndOptimum
in class Area
public int traitIPDimensionOpt()
AreaFlexible
traitIPDimensionOpt
in class AreaFlexible
public org.axsl.common.value.WhiteSpaceTreatment traitWhiteSpaceTreatment()
traitWhiteSpaceTreatment
in class Area
public int traitFontSize()
public org.axsl.font.FontUse getPrimaryFont()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |