|
||||||||||
| 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.LeaderAreaLeaderPatternPa.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.LeaderAreapublic int traitRuleThickness()
traitRuleThickness in interface org.axsl.galley.LeaderAreapublic int actualWordSpacing()
public int wordSpacing()
wordSpacing in interface org.axsl.galley.TextAreapublic int letterSpacing()
letterSpacing in interface org.axsl.galley.TextAreapublic int dotLeaderTextOffset()
public CharSequence getText()
getText in interface org.axsl.galley.TextAreapublic CharSequence dotLeaderText()
dotLeaderText in interface org.axsl.galley.LeaderAreapublic 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.GalleyVisitorExceptionprotected boolean optimize()
AreaNodePageRA.layoutComplete().
optimize in class AreaNodepublic FOLinkage getLinkage()
AreaNode
getLinkage in class AreaNodepublic org.axsl.fo.fo.Leader traitGeneratedBy()
traitGeneratedBy in interface org.axsl.area.AreaNodetraitGeneratedBy in class AreaNodepublic Area getParent()
getParent in interface TreeNodegetParent in class AreaNode
public void setParent(AreaNode node)
throws org.axsl.area.AreaTreeException
AreaNode
setParent in class AreaNodenode - 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 Areapublic int traitBorderEndWidth()
Area
traitBorderEndWidth in class Areapublic int traitBorderBeforeWidth()
Area
traitBorderBeforeWidth in class Areapublic int traitBorderAfterWidth()
Area
traitBorderAfterWidth in class Areapublic int traitPaddingStart()
Area
traitPaddingStart in class Areapublic int traitPaddingEnd()
Area
traitPaddingEnd in class Areapublic int traitPaddingBefore()
Area
traitPaddingBefore in class Areapublic int traitPaddingAfter()
Area
traitPaddingAfter in class Areapublic int traitSpaceStartOptimum()
Area
traitSpaceStartOptimum in class Areapublic int traitSpaceEndOptimum()
Area
traitSpaceEndOptimum in class Areapublic int getCharWidth(int c)
c - The Unicode codepoint whose width should be computed.
public boolean traitUnderlineScore()
traitUnderlineScore in interface org.axsl.galley.GeneralInlineAreapublic boolean traitOverlineScore()
traitOverlineScore in interface org.axsl.galley.GeneralInlineAreapublic boolean traitThroughScore()
traitThroughScore in interface org.axsl.galley.GeneralInlineAreapublic Color traitUnderlineScoreColor()
traitUnderlineScoreColor in interface org.axsl.galley.GeneralInlineAreapublic Color traitOverlineScoreColor()
traitOverlineScoreColor in interface org.axsl.galley.GeneralInlineAreapublic Color traitThroughScoreColor()
traitThroughScoreColor in interface org.axsl.galley.GeneralInlineAreapublic int traitIPDimensionOpt()
AreaFlexible
traitIPDimensionOpt in class AreaFlexiblepublic Color traitColor()
traitColor in interface org.axsl.galley.GeneralInlineAreapublic int traitFontSize()
traitFontSize in interface org.axsl.galley.TextAreapublic org.axsl.font.FontUse getPrimaryFont()
getPrimaryFont in interface org.axsl.galley.TextAreapublic 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 | |||||||||