|
Unified Typesetting API M1-20040817 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
A linebreak algorithm breaks one line of text into several ones with each of them having a given length. Such an algorithm can either work line based, finding the local optimum of a line width or paragraph based, searching for a global optimum of linebreaks.
A linebreak algorithm receives a sequence of socalled items, where
each Item can contain anything
(the linebreak algorithm is not interested in the content) and a linebreak
is allowed behind every such item. Therefore an item will most commonly
represent a word or a syllable. An item will in most cases also the
sourrounding whitespace although this is not required. You can also put
every whitespace in a item of its own.
The LineWidthModel provides
the line width for every single line. The consider(Item) method
called from outside informs the linebreaker of a new item. A call to
getBreakpoints() finishes the linebreaking and returns the
calculated breakpoints.
Have a look into Feature for features
a linebreaker can support. Implementations have to provide a list of
features.
| Method Summary | |
void |
consider(Item newItem)
Tells the line breaker that he has to consider a newly generated item. |
List |
getBreakpoints()
Returns the generated breakpoints. |
FeatureList |
getFeatures()
Returns a list of supported features. |
LineWidthModel |
getLineWidthModel()
Returns the line width model used. |
void |
setLineWidthModel(LineWidthModel aModel)
Sets the line width model. |
| Method Detail |
public void setLineWidthModel(LineWidthModel aModel)
aModel - The model to use.public LineWidthModel getLineWidthModel()
public FeatureList getFeatures()
getFeatures in interface QManageablepublic void consider(Item newItem)
newItem - The new Item to consider.public List getBreakpoints()
consider(Item) are made.
|
Unified Typesetting API M1-20040817 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
![]() An inghuimische.de project. | Copyright (C) 2004 Christian Ziesemer; See the Mozilla Public License for more details. |