|
Unified Typesetting API M1-20040817 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.inghuimische.uta.AbstractItem
de.inghuimische.uta.test.SimpleItem
A simple implementation of the item interface with no support for
multiple widths or item position. Implementations using this class
can therefore not claim to support
Feature.MULTIPLE_WIDTHS
or
Feature.ITEM_POSITION
.
This item allows to associate text in form of a string with it (for debugging).
Field Summary |
Fields inherited from interface de.inghuimische.uta.Item |
DENSITY_END, DENSITY_START, POSTBREAK, PREBREAK, STANDALONE, SURROUNDED |
Constructor Summary | |
SimpleItem(Width aWidth,
String aText)
Constructs a new item with given width and text. |
Method Summary | |
void |
addJustifiable(Justifiable aJustifable)
Adds a justifiable to the item. |
List |
getBoxes()
Returns a list of boxes contained in this item. |
double |
getBreakPenalty()
Always returns 0. |
int |
getPosition()
Returns the position of the item within the line. |
String |
getText()
Returns the text associated with this item. |
Width |
getWidth(int itemPos)
Returns the width of the item, the item position is not honored. |
List |
setPosition(int finalPosition)
Sets the final position of the item and returns a list of Justifiables
contained in this item. |
Methods inherited from class de.inghuimische.uta.AbstractItem |
getInnerEmbeddingLevels, getOpticalDensity |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleItem(Width aWidth, String aText)
aWidth
- The width of the item.aText
- The text associated with this item.Method Detail |
public Width getWidth(int itemPos)
itemPos
- This parameter is ignored by this implementation.
Item.STANDALONE
,
Item.PREBREAK
,
Item.POSTBREAK
,
Item.SURROUNDED
public double getBreakPenalty()
public String getText()
public void addJustifiable(Justifiable aJustifable)
aJustifable
- The justifiable to add.public List setPosition(int finalPosition)
Item
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 List getBoxes()
Item
public int getPosition()
Item
|
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. |