|
||||||||||
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.AbstractInlineArea
org.foray.area.AbstractAncestralInlineArea
org.foray.area.LeaderArea
public final class LeaderArea
An Area containing a leader item.
There are at least two approaches that can be taken in the design of this class. The first is that its instances are placeholders during the layout process, and then at render-time, it should convert or replace itself with other objects (likes words and spaces) that represent its content. The problem with this approach is that it may not take advantage of the Renderer's capabilities. FOray has instead chosen to let the Renderer render the leader in whatever manner it sees fit.
Space and rule leaders are pretty straightforward. Dot leaders and use-content leaders require more effort. FOray treats a dot leader as a specific case (a subset) of use-content leaders. In other words, the content of use-content is a dot. To render any use-content leader, the Renderer must know the following things:
dotLeaderTextOffset()
.actualWordSpacing()
.dotLeaderText()
for dot leaders.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.foray.common.AbstractOrderedTreeNode |
---|
AbstractOrderedTreeNode.PostOrderDescendantIterator |
Method Summary | |
---|---|
int |
actualWordSpacing()
Computes the size of the extra word spacing that should be between each dot character, that is, the additional displacement beyond the width of the space character itself. |
CharSequence |
dotLeaderText()
|
int |
dotLeaderTextOffset()
Computes the offset from this's start-edge at which the first dot should appear. |
int |
dotLeaderTextSize()
Returns the size of the leader text. |
String |
getAreaName()
|
int |
getCharWidth(int c)
Computes the width of a character, in millipoints. |
FOLinkage |
getLinkage()
Returns the raw "generated by" instance. |
Area |
getParent()
|
org.axsl.font.FontUse |
getPrimaryFont()
|
org.axsl.font.FontUse |
getSecondaryFont(int codePoint)
|
CharSequence |
getText()
|
int |
letterSpacing()
|
protected 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. |
void |
render(org.axsl.galley.RenderVisitor visitor)
|
void |
setParent(AreaNode node)
Sets the parent node. |
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. |
Color |
traitColor()
|
int |
traitFontSize()
Returns the font-size trait. |
org.axsl.fo.fo.Leader |
traitGeneratedBy()
|
int |
traitIPDimensionOpt()
Return the optimum IP dimension for this area. |
org.axsl.common.value.LeaderAlignment |
traitLeaderAlignment()
Pass-thru of the FOTree trait value. |
int |
traitLeaderLengthMax()
Returns the maximum length of this leader, in millipoints. |
int |
traitLeaderLengthMin()
Returns the minimum length of this leader, in millipoints. |
int |
traitLeaderLengthOpt()
Returns the optimum length of this leader, in millipoints. |
org.axsl.common.value.LeaderPattern |
traitLeaderPattern()
Pass-thru of the FOTree trait value, with one exception. |
int |
traitLeaderPatternWidth()
Pass-thru of the FOTree trait value. |
boolean |
traitOverlineScore()
|
Color |
traitOverlineScoreColor()
|
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.RuleStyle |
traitRuleStyle()
|
int |
traitRuleThickness()
|
int |
traitSpaceEndOptimum()
Returns the space-end optimum trait for this area. |
int |
traitSpaceStartOptimum()
Returns the space-start optimum trait for this area. |
boolean |
traitThroughScore()
|
Color |
traitThroughScoreColor()
|
boolean |
traitUnderlineScore()
|
Color |
traitUnderlineScoreColor()
|
int |
wordSpacing()
|
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.TextArea |
---|
fontOptions, orthography |
Methods inherited from interface org.axsl.galley.GeneralInlineArea |
---|
baselineX, baselineY, getLineArea |
Methods inherited from interface org.axsl.galley.Area |
---|
brBpd, brIpd, brOriginX, brOriginY, crBpd, crIpd, crOriginX, crOriginY, destinationName, generatedByExists, generatedByName, isLinkRoot, linkDestination, linkType, traitId |
Methods inherited from interface org.axsl.galley.AreaNode |
---|
getChildAt, getGalley |
Methods inherited from interface javax.swing.tree.TreeNode |
---|
children, getAllowsChildren, getChildCount, getIndex, isLeaf |
Methods inherited from interface java.lang.Iterable |
---|
iterator |
Methods inherited from interface org.axsl.area.Area |
---|
crBpd, crIpd, pdAvailable |
Methods inherited from interface org.axsl.area.AreaNode |
---|
ancestorArea, ancestorBlockContentFactory, ancestorNormalBlockArea, ancestorTableArea, getAreaTree, getPage, isFirstChildOfGeneratedBy, nearestArea, nearestGeneratedByBlockLevelFo, removeChild, siblingIndex |
Methods inherited from interface org.axsl.fo.FoContext |
---|
bpdAncestorBlockOrRa, getGraftingPoint, heightContainingBlock, ipdAncestorBlockArea, ipdAncestorBlockOrRa, ipdContainingRefArea, ipdParentArea, isFirst, isLast, tableWidth, widthContainingBlock |
Methods inherited from interface org.axsl.area.LineContentFactory |
---|
makeBasicLinkArea, makeBidiOverrideArea, makeExternalGraphicArea, makeForeignObjectArea, makeGlyphAreaSequence, makeIndexPageCitationListArea, makeInlineArea, makeInlineContainerArea, makeLeaderArea, makePageNumberArea, makePageNumberCitationArea, makePageNumberCitationLastArea, makeScalingValueCitationArea |
Method Detail |
---|
public org.axsl.common.value.LeaderPattern traitLeaderPattern()
traitLeaderPattern
in interface org.axsl.galley.LeaderArea
LeaderPatternPa.traitLeaderPattern(org.axsl.fo.FoContext)
public int traitLeaderPatternWidth()
LeaderPatternWidthPa.traitLeaderPatternWidth(org.axsl.fo.FoContext)
public org.axsl.common.value.LeaderAlignment traitLeaderAlignment()
LeaderAlignmentPa.traitLeaderAlignment(org.axsl.fo.FoContext)
public org.axsl.common.value.RuleStyle traitRuleStyle()
traitRuleStyle
in interface org.axsl.galley.LeaderArea
public int traitRuleThickness()
traitRuleThickness
in interface org.axsl.galley.LeaderArea
public int actualWordSpacing()
public int wordSpacing()
wordSpacing
in interface org.axsl.galley.TextArea
public int letterSpacing()
letterSpacing
in interface org.axsl.galley.TextArea
public int dotLeaderTextOffset()
public CharSequence getText()
getText
in interface org.axsl.galley.TextArea
public CharSequence dotLeaderText()
dotLeaderText
in interface org.axsl.galley.LeaderArea
public int dotLeaderTextSize()
public int traitLeaderLengthMin()
public int traitLeaderLengthOpt()
public int traitLeaderLengthMax()
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
protected boolean optimize()
AreaNode
PageRA.layoutComplete()
.
optimize
in class AreaNode
public FOLinkage getLinkage()
AreaNode
getLinkage
in class AreaNode
public org.axsl.fo.fo.Leader traitGeneratedBy()
traitGeneratedBy
in interface org.axsl.area.AreaNode
traitGeneratedBy
in class AreaNode
public Area 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 int traitBorderStartWidth()
Area
traitBorderStartWidth
in class Area
public int traitBorderEndWidth()
Area
traitBorderEndWidth
in class Area
public int traitBorderBeforeWidth()
Area
traitBorderBeforeWidth
in class Area
public int traitBorderAfterWidth()
Area
traitBorderAfterWidth
in class Area
public int traitPaddingStart()
Area
traitPaddingStart
in class Area
public int traitPaddingEnd()
Area
traitPaddingEnd
in class Area
public int traitPaddingBefore()
Area
traitPaddingBefore
in class Area
public int traitPaddingAfter()
Area
traitPaddingAfter
in class Area
public int traitSpaceStartOptimum()
Area
traitSpaceStartOptimum
in class Area
public int traitSpaceEndOptimum()
Area
traitSpaceEndOptimum
in class Area
public int getCharWidth(int c)
c
- The Unicode codepoint whose width should be computed.
public boolean traitUnderlineScore()
traitUnderlineScore
in interface org.axsl.galley.GeneralInlineArea
public boolean traitOverlineScore()
traitOverlineScore
in interface org.axsl.galley.GeneralInlineArea
public boolean traitThroughScore()
traitThroughScore
in interface org.axsl.galley.GeneralInlineArea
public Color traitUnderlineScoreColor()
traitUnderlineScoreColor
in interface org.axsl.galley.GeneralInlineArea
public Color traitOverlineScoreColor()
traitOverlineScoreColor
in interface org.axsl.galley.GeneralInlineArea
public Color traitThroughScoreColor()
traitThroughScoreColor
in interface org.axsl.galley.GeneralInlineArea
public int traitIPDimensionOpt()
AreaFlexible
traitIPDimensionOpt
in class AreaFlexible
public Color traitColor()
traitColor
in interface org.axsl.galley.GeneralInlineArea
public int traitFontSize()
traitFontSize
in interface org.axsl.galley.TextArea
public org.axsl.font.FontUse getPrimaryFont()
getPrimaryFont
in interface org.axsl.galley.TextArea
public org.axsl.font.FontUse getSecondaryFont(int codePoint)
getSecondaryFont
in interface org.axsl.galley.TextArea
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |