Package org.eclipse.draw2d.text
Class FlowBox
java.lang.Object
org.eclipse.draw2d.text.FlowBox
- Direct Known Subclasses:
- CompositeBox,- ContentBox
A Geometric object for representing a region on a line of Text. This class
 adds the notion of a baseline to
 
Rectangle. Ascent is the distance
 above the baseline. Descent is the distance below the baseline.
 
 This class should not be treated as a Rectangle by clients. It
 is important to use getters when available for lazy calculation of values.
- Since:
- 2.1
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract booleancontainsPoint(int x, int y) This method must be called on a block that is completely positioned and committed.abstract intReturns the amount of line content in pixels which is above the baseline.abstract intReturns y coordinate for the box's baseline.abstract intReturns the amount of line content in pixels which is below the baseline.intgetWidth()Returns the width of the box.intgetX()Returns the X coordinate of the box.booleanReturnstrueif any of the children are bi-directional.voidsetWidth(int width) Sets the width of the box.voidsetX(int x) Sets the x coordinate for this box.
- 
Constructor Details- 
FlowBoxpublic FlowBox()
 
- 
- 
Method Details- 
containsPointpublic abstract boolean containsPoint(int x, int y) This method must be called on a block that is completely positioned and committed.- Parameters:
- x- X
- y- Y
- Returns:
- trueif the FlowBox contains the point
 
- 
getAscentpublic abstract int getAscent()Returns the amount of line content in pixels which is above the baseline. Ascent and descent are used to space consecutive lines apart. Certain types of line content, such as borders, extend beyond the ascent and descent.- Returns:
- the descent in pixels below the baseline
 
- 
getBaselinepublic abstract int getBaseline()Returns y coordinate for the box's baseline.- Returns:
- the baseline location
- Since:
- 3.1
 
- 
getDescentpublic abstract int getDescent()Returns the amount of line content in pixels which is below the baseline.- Returns:
- the descent in pixels
- See Also:
 
- 
getWidthpublic int getWidth()Returns the width of the box.- Returns:
- the box's width
 
- 
getXpublic int getX()Returns the X coordinate of the box.- Returns:
- the x coordinate
- Since:
- 3.1
 
- 
requiresBidipublic boolean requiresBidi()Returnstrueif any of the children are bi-directional. Default implementation returns false.- Returns:
- trueif the box is bi-directional
- Since:
- 3.1
 
- 
setWidthpublic void setWidth(int width) Sets the width of the box.- Parameters:
- width- the new width
- Since:
- 3.1
 
- 
setXpublic void setX(int x) Sets the x coordinate for this box.- Parameters:
- x- the x coordinate
- Since:
- 3.1
 
 
-