Package org.eclipse.draw2d.text
Class BlockBox
java.lang.Object
org.eclipse.draw2d.text.FlowBox
org.eclipse.draw2d.text.CompositeBox
org.eclipse.draw2d.text.BlockBox
A CompositeBox suitable for containing multiple LineBox fragments.
- Since:
- 2.1
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds the given box and updates properties of this composite box.booleancontainsPoint(int x, int y) This method must be called on a block that is completely positioned and committed.intReturns the amount of line content in pixels which is above the baseline.intReturns y coordinate for the box's baseline.intReturns the amount of line content in pixels which is below the baseline.intvoidsetHeight(int h) Sets the height.voidsetLineTop(int y) 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.CompositeBoxgetRecommendedWidth, setRecommendedWidth
- 
Method Details- 
addDescription copied from class:CompositeBoxAdds the given box and updates properties of this composite box.- Specified by:
- addin class- CompositeBox
- Parameters:
- box- the child being added
- See Also:
 
- 
containsPointpublic boolean containsPoint(int x, int y) Description copied from class:FlowBoxThis method must be called on a block that is completely positioned and committed.- Specified by:
- containsPointin class- FlowBox
- Parameters:
- x- X
- y- Y
- Returns:
- trueif the FlowBox contains the point
- See Also:
 
- 
getAscentpublic int getAscent()Description copied from class:FlowBoxReturns 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.
- 
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:
 
- 
getDescentpublic int getDescent()Description copied from class:FlowBoxReturns the amount of line content in pixels which is below the baseline.- Specified by:
- getDescentin class- FlowBox
- Returns:
- the descent in pixels
- See Also:
 
- 
getHeightpublic int getHeight()- Returns:
- Returns the height.
 
- 
setHeightpublic void setHeight(int h) Sets the height.- Parameters:
- h- The height
 
- 
setLineToppublic void setLineTop(int y) 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:
- y- the y coordinate
- See Also:
 
 
-