|
fop 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.layoutmgr.AbstractBaseLayoutManager
org.apache.fop.layoutmgr.AbstractLayoutManager
org.apache.fop.layoutmgr.inline.LeafNodeLayoutManager
org.apache.fop.layoutmgr.inline.TextLayoutManager
LayoutManager for text (a sequence of characters) which generates one or more inline areas.
Field Summary |
Fields inherited from class org.apache.fop.layoutmgr.inline.LeafNodeLayoutManager |
areaInfo, commonBorderPaddingBackground, curArea, isSomethingChanged, log |
Fields inherited from class org.apache.fop.layoutmgr.AbstractLayoutManager |
childLMiter, childLMs, curChildLM, fobjIter, parentLayoutManager |
Fields inherited from class org.apache.fop.layoutmgr.AbstractBaseLayoutManager |
fobj, generatesBlockArea, generatesReferenceArea |
Constructor Summary | |
TextLayoutManager(FOText node)
Create a Text layout manager. |
Method Summary | |
java.util.List |
addALetterSpaceTo(java.util.List oldList)
Tell the LM to modify its data, adding a letter space to the word fragment represented by the given elements, and returning the corrected elements |
void |
addAreas(PositionIterator posIter,
LayoutContext context)
Generate and add areas to parent area. |
boolean |
applyChanges(java.util.List oldList)
Tell the LM to apply the changes due to hyphenation |
java.util.List |
getChangedKnuthElements(java.util.List oldList,
int alignment)
Get a sequence of KnuthElements representing the content of the node assigned to the LM, after changes have been applied In the context of line breaking, this method is called after hyphenation has been performed, in order to receive the sequence of elements representing the text together with all possible hyphenation points. For example, if the text "representation" originates a single box element when getNextKnuthElements() is called, it will be now split in syllables (rep-re-sen-ta-tion) each one originating a box and divided by additional elements allowing a line break. In the context of page breaking, this method is called only if the pages need to be "vertically justified" modifying (also) the quantity of lines created by the paragraphs, and after a first page breaking has been performed. According to the result of the first page breaking, each paragraph now knows how many lines it must create (among the existing layout possibilities) and has to create a sequence of elements representing this layout; in particular, each box, representing a line, will contain a LineBreakPositions that will be used in the addAreas() phase. LMs having children look at the old list of elements in order to know which ones they must get the new elements from, as break conditions of preserved linefeeds can divide children into smaller groups (page sequences or paragraphs). LMs having no children can simply return the old elements if they have nothing to change. Inline LMs need to know the text alignment because it affects the elements representing feasible breaks between syllables. |
java.util.List |
getNextKnuthElements(LayoutContext context,
int alignment)
Get a sequence of KnuthElements representing the content of the node assigned to the LM |
java.lang.String |
getWordChars(Position pos)
Get the word chars corresponding to the given position. |
void |
hyphenate(Position pos,
HyphContext hyphContext)
Tell the LM to hyphenate a word |
void |
initialize()
initialize the layout manager. Allows each layout manager to calculate often used values. |
void |
removeWordSpace(java.util.List oldList)
Removes the AreaInfo object represented by the given elements, so that it won't
generate any element when getChangedKnuthElements is called. |
Methods inherited from class org.apache.fop.layoutmgr.inline.LeafNodeLayoutManager |
addChildArea, addKnuthElementsForBorderPaddingEnd, addKnuthElementsForBorderPaddingStart, get, getAllocationIPD, getEffectiveArea, getParentArea, makeAlignmentContext, offsetArea, resolved, setCommonBorderPaddingBackground, setCurrentArea, widthAdjustArea |
Methods inherited from class org.apache.fop.layoutmgr.AbstractLayoutManager |
addChildLM, addChildLMs, addId, addMarkersToPage, checkEndOfLayout, createChildLMs, createNextChildLMs, getChildLM, getChildLMs, getCurrentPage, getCurrentPV, getParent, getPSLM, hasNextChildLM, isFinished, isFirst, isLast, notifyEndOfLayout, notifyPos, reset, setCurrentChildLM, setFinished, setParent, toString, transferExtensionAttachments, transferExtensions, transferForeignAttributes |
Methods inherited from class org.apache.fop.layoutmgr.AbstractBaseLayoutManager |
getAncestorBlockAreaBPD, getAncestorBlockAreaIPD, getBaseLength, getContentAreaBPD, getContentAreaIPD, getFObj, getGeneratesBlockArea, getGeneratesLineArea, getGeneratesReferenceArea, getNextKnuthElements, getParentAreaBPD, getParentAreaIPD, getReferenceAreaBPD, getReferenceAreaIPD, isRestartable, setGeneratesBlockArea, setGeneratesReferenceArea |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.fop.layoutmgr.LayoutManager |
addChildLM, addChildLMs, createNextChildLMs, getChildLMs, getContentAreaBPD, getContentAreaIPD, getFObj, getGeneratesBlockArea, getGeneratesLineArea, getGeneratesReferenceArea, getNextKnuthElements, getParent, getPSLM, isFinished, isRestartable, notifyPos, reset, setFinished, setParent |
Methods inherited from interface org.apache.fop.datatypes.PercentBaseContext |
getBaseLength |
Constructor Detail |
public TextLayoutManager(FOText node)
node
- The FOText object to be renderedMethod Detail |
public void initialize()
initialize
in interface LayoutManager
initialize
in class AbstractLayoutManager
public void addAreas(PositionIterator posIter, LayoutContext context)
addAreas
in interface LayoutManager
addAreas
in class LeafNodeLayoutManager
posIter
- Iterator over Position information returned
by this LayoutManager.context
- LayoutContext for adjustmentspublic java.util.List getNextKnuthElements(LayoutContext context, int alignment)
getNextKnuthElements
in interface LayoutManager
getNextKnuthElements
in class LeafNodeLayoutManager
public java.util.List addALetterSpaceTo(java.util.List oldList)
addALetterSpaceTo
in interface InlineLevelLayoutManager
addALetterSpaceTo
in class LeafNodeLayoutManager
public void removeWordSpace(java.util.List oldList)
AreaInfo
object represented by the given elements, so that it won't
generate any element when getChangedKnuthElements
is called.
removeWordSpace
in interface InlineLevelLayoutManager
removeWordSpace
in class LeafNodeLayoutManager
oldList
- the elements representing the word spacepublic void hyphenate(Position pos, HyphContext hyphContext)
hyphenate
in interface InlineLevelLayoutManager
hyphenate
in class LeafNodeLayoutManager
public boolean applyChanges(java.util.List oldList)
applyChanges
in interface InlineLevelLayoutManager
applyChanges
in class LeafNodeLayoutManager
public java.util.List getChangedKnuthElements(java.util.List oldList, int alignment)
getChangedKnuthElements
in interface LayoutManager
getChangedKnuthElements
in class LeafNodeLayoutManager
public java.lang.String getWordChars(Position pos)
getWordChars
in interface InlineLevelLayoutManager
getWordChars
in class LeafNodeLayoutManager
|
fop 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |