Package org.eclipse.draw2d.text
Class LineRoot
java.lang.Object
org.eclipse.draw2d.text.FlowBox
org.eclipse.draw2d.text.CompositeBox
org.eclipse.draw2d.text.LineBox
org.eclipse.draw2d.text.LineRoot
LineRoot is the top-most container on a line of text displayed in Draw2d.
 Hence, a LineRoot can tell you of things like the highest ascent or descent
 on a line, which is required to display selection and such. All
 
fragments know of the LineRoot
 they belong to.- Since:
- 3.1
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds the given box and updates properties of this composite box.voidcommit()Committing a LineRoot will position its children correctly.booleancontainsPoint(int x, int y) A LineRoot cannot be targetted.intReturns y coordinate for the box's baseline.voidsetBaseline(int baseline) Positions the line vertically by settings its baseline.voidsetLineTop(int top) Positions the box vertically by setting the y coordinate for the top of the content of the line.Methods inherited from class org.eclipse.draw2d.text.LineBoxgetAscent, getDescent, isOccupied, requiresBidiMethods inherited from class org.eclipse.draw2d.text.CompositeBoxgetRecommendedWidth, setRecommendedWidth
- 
Constructor Details- 
LineRootpublic LineRoot(boolean isMirrored) Constructor- Parameters:
- isMirrored-- trueif the line is to be displayed in a mirrored control
 
 
- 
- 
Method Details- 
addDescription copied from class:CompositeBoxAdds the given box and updates properties of this composite box.
- 
commitpublic void commit()Committing a LineRoot will position its children correctly. All children boxes are made to have the same baseline, and are laid out according to the Unicode BiDi Algorithm, or left-to-right if Bidi is not necessary.
- 
containsPointpublic boolean containsPoint(int x, int y) A LineRoot cannot be targetted.- Specified by:
- containsPointin class- FlowBox
- Parameters:
- x- X
- y- Y
- Returns:
- trueif the FlowBox contains the point
- See Also:
 
- 
getBaselinepublic int getBaseline()Description copied from class:FlowBoxReturns y coordinate for the box's baseline.- Specified by:
- getBaselinein class- FlowBox
- Returns:
- the baseline location
- See Also:
 
- 
setBaselinepublic void setBaseline(int baseline) Positions the line vertically by settings its baseline.- Parameters:
- baseline- the baseline
 
- 
setLineToppublic void setLineTop(int top) Description copied from class:CompositeBoxPositions the box vertically by setting the y coordinate for the top of the content of the line. For internal use only.- Specified by:
- setLineTopin class- CompositeBox
- Parameters:
- top- the y coordinate
- See Also:
 
 
-