|
Unified Typesetting API M1-20040817 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A justifiable is some kind of box/item with changeable width. In latin scripts this is in most cases shrink/stretchable whitespace. A script generates justifiables where it is appropriate. They are used to justify a line. After linebreaking the widths of all encountered justifiables must be adjusted if justification is required.
A justifiable may either stretch or shrink infinitely variable or have a set of fixed possible widths. This may be the case if a script requires alternative fixed-width glyphs. Adjusting the width may also involve a change of the glyph shape.
Note that this allows fine-tuning of justification and such things like inter letter spacing.
The concept of a justifiable is very similar to the glue in TeX.
Method Summary | |
double[] |
getPossibleWidths()
This method provides valid values for the call to setWidth(double) or null if any value between
getShrinkability() and getStrechability() is valid. |
double |
getShrinkability()
Returns the shrinkability of this justifiable. |
double |
getStrechability()
Returns the stretchability of this justifiable. |
int |
getValidPositions()
Returns the positions where the Justifiable should be used for justification. |
void |
setValidPositions(int validPositions)
The position argument tells when the justifiable should be used for justification. |
void |
setWidth(double newWidth)
Sets the width of the justifiable. |
Method Detail |
public void setWidth(double newWidth)
newWidth
- The new width of the justifiable.getPossibleWidths()
public double[] getPossibleWidths()
setWidth(double)
or null
if any value between
getShrinkability()
and getStrechability()
is valid.
null
if it is infinitely
variable.public double getShrinkability()
public double getStrechability()
public void setValidPositions(int validPositions)
Item.POSTBREAK
,
Item.PREBREAK
,
Item.STANDALONE
and
Item.SURROUNDED
. The most common value
will be SOUROUNDED
. If a justifiable is valid for any
position say STANDALONE | SOURROUNDED | PREBREAK | POSTBREAK
.
validPositions
- The positions where the justifiable is valid,
telling when it should be used for justificationpublic int getValidPositions()
|
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. |