|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.draw2d.text.FlowBox | +--org.eclipse.draw2d.text.CompositeBox | +--org.eclipse.draw2d.text.LineBox
A composite box representing a single line. LineBox calculates its ascent and descent
from the child boxes it contains. Clients can call getAscent()
or FlowBox.getHeight()
at any time and expect valid values. The child boxes that are added to a
line have unspecied locations until commit()
is called, at which time the
child boxes are layed out in left-to-right order, and their baselines are all aligned
vertically.
Field Summary |
Fields inherited from class org.eclipse.draw2d.text.CompositeBox |
fragments |
Fields inherited from class org.eclipse.draw2d.text.FlowBox |
x, y |
Constructor Summary | |
LineBox()
|
Method Summary | |
void |
commit()
Committing a LineBox will position its children correctly. |
int |
getAscent()
By default, a FlowBox is all ascent, and no descent, so the height is returned. |
int |
getAvailableWidth()
Returns the width available to child fragments. |
int |
getBaseline()
Returns the baseline of this LineBox, which is the y value plus the ascent. |
void |
makeBaseline(int value)
Used to set the baseline of this FlowBox to the specified value. |
protected void |
resetInfo()
resets fields before unioning the data from the fragments. |
protected void |
unionInfo(FlowBox blockInfo)
unions the fragment's width, height, and ascent into this composite. |
Methods inherited from class org.eclipse.draw2d.text.CompositeBox |
add, clear, getFragments, getRecommendedWidth, isOccupied, setRecommendedWidth |
Methods inherited from class org.eclipse.draw2d.text.FlowBox |
containsPoint, getDescent, getHeight, getWidth |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LineBox()
Method Detail |
public void commit()
public int getAscent()
FlowBox
getAscent
in class FlowBox
FlowBox.getAscent()
public int getAvailableWidth()
public int getBaseline()
public void makeBaseline(int value)
FlowBox
makeBaseline
in class FlowBox
value
- the new baselineFlowBox.makeBaseline(int)
protected void resetInfo()
CompositeBox
resetInfo
in class CompositeBox
CompositeBox.resetInfo()
protected void unionInfo(FlowBox blockInfo)
CompositeBox
unionInfo
in class CompositeBox
blockInfo
- the fragmentCompositeBox.unionInfo(FlowBox)
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |