|
Unified Typesetting API M1-20040817 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An item is the unit a linebreak algorithm has to deal with. A linebreak algorithm does not look inside an item. Linebreaks are allowed behind every item.
An item can occur in four different places in a line
Until the final line break takes place an item has the four different
states mentioned above. After the linebreaks are calculated the
setPosition(int)
method is called which returns the
Justifiables
contained
within the item. Those Justifiables get justified. An item keeps track
which of the Boxes
it represents
are already processed. A box is processed if the next following justifiable
is processed or if there are now further boxes to process. In the latter
case the item is fully processed. Processed boxes are forwarded to the
item listener.
The width of an item may be negative, also there is no need for it, therefore negative values are deprecated. If negative values seem to be neccessary think if the script used can use those values within an item (e.g. negative values may be useful with kerning and ligatures).
Field Summary | |
static boolean |
DENSITY_END
Used when the density of the trailing character is requested. |
static boolean |
DENSITY_START
Used when the density of the leading character is requested. |
static int |
POSTBREAK
Used when an item appears after a line break or at the end of a paragraph. |
static int |
PREBREAK
Used when an item appears before a line break or at the start of a paragraph. |
static int |
STANDALONE
Used when an item appears alone in a line. |
static int |
SURROUNDED
Used when an item appears between two other items. |
Method Summary | |
List |
getBoxes()
Returns a list of boxes contained in this item. |
double |
getBreakPenalty()
Specifies the penalty for breaking after this item. |
List |
getInnerEmbeddingLevels()
Returns the embedding levels contained within or an empty list if there are none. |
double |
getOpticalDensity(boolean startOrEnd,
int itemPosition)
Returns the optical density of the item which is either the density of the leading or trailing character. |
int |
getPosition()
Returns the position of the item within the line. |
Width |
getWidth(int itemPos)
Returns the width of the item for the given position. |
List |
setPosition(int finalPosition)
Sets the final position of the item and returns a list of Justifiables
contained in this item. |
Field Detail |
public static final int SURROUNDED
public static final int PREBREAK
public static final int POSTBREAK
public static final int STANDALONE
PREBREAK | POSTBREAK
.
public static final boolean DENSITY_START
public static final boolean DENSITY_END
Method Detail |
public Width getWidth(int itemPos)
STANDALONE
,
PREBREAK
,
POSTBREAK
,
SURROUNDED
public double getBreakPenalty()
public double getOpticalDensity(boolean startOrEnd, int itemPosition)
Most implementations will return a negative value here until they want to with optical justification. Currently UTA provides no method, not even a definition for the optical density of a glyph. Of course, a hyphen is expected to have a lower density than an 'a'.
startOrEnd
- Specifies whether the leading or trailing character
of the item is of interest.itemPosition
- The position within the line.
public List setPosition(int finalPosition)
Justifiables
contained in this item. This method has to be called after the
optimal line breaks are calculated and when justification has to take
place.
Justifiables
contained in this item.public int getPosition()
public List getBoxes()
public List getInnerEmbeddingLevels()
|
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. |