Package org.eclipse.draw2d.text
Class AbstractFlowBorder
java.lang.Object
org.eclipse.draw2d.AbstractBorder
org.eclipse.draw2d.text.AbstractFlowBorder
- All Implemented Interfaces:
Border,FlowBorder
A basis for implementing
FlowBorder. Subclassing this class will
possibly guarantee compatibility with future changes to the FlowBorder
interface. This class also returns default values for many of the required
methods as a convenience.- Since:
- 3.1
-
Field Summary
Fields inherited from class org.eclipse.draw2d.AbstractBorder
tempRect -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the collapsable bottom margin in pixels.Returns the Insets for this Border for the given Figure.intReturns the left margin in pixels.intReturns the right margin in pixels.intReturns the collapsable top margin in pixels.final voidThis method is not called on FlowBorders.voidpaint(FlowFigure figure, Graphics g, Rectangle where, int sides) Subclasses should override this method to paint each box's border.Methods inherited from class org.eclipse.draw2d.AbstractBorder
getPaintRectangle, getPreferredSize, isOpaqueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.draw2d.Border
getPreferredSize, isOpaque
-
Constructor Details
-
AbstractFlowBorder
public AbstractFlowBorder()
-
-
Method Details
-
getBottomMargin
public int getBottomMargin()Description copied from interface:FlowBorderReturns the collapsable bottom margin in pixels. Margin is the space external to the border and the flow box on which it is rendered. Vertical margins (top and bottom) may collapse in some situations, such as adjacent or nested blocks.- Specified by:
getBottomMarginin interfaceFlowBorder- Returns:
- the bottom margin
- See Also:
-
getInsets
Description copied from interface:BorderReturns the Insets for this Border for the given Figure. -
getLeftMargin
public int getLeftMargin()Description copied from interface:FlowBorderReturns the left margin in pixels. Margin is the space external to the border and the flow box on which it is rendered.- Specified by:
getLeftMarginin interfaceFlowBorder- Returns:
- the left margin
- See Also:
-
getRightMargin
public int getRightMargin()Description copied from interface:FlowBorderReturns the right margin in pixels. Margin is the space external to the border and the flow box on which it is rendered.- Specified by:
getRightMarginin interfaceFlowBorder- Returns:
- the right margin
- See Also:
-
getTopMargin
public int getTopMargin()Description copied from interface:FlowBorderReturns the collapsable top margin in pixels. Margin is the space external to the border and the flow box on which it is rendered. Vertical margins (top and bottom) may collapse in some situations, such as adjacent or nested blocks.- Specified by:
getTopMarginin interfaceFlowBorder- Returns:
- the top margin
- See Also:
-
paint
This method is not called on FlowBorders. For this reason it is implemented here and madefinalso that clients override the correct method. -
paint
Subclasses should override this method to paint each box's border.- Specified by:
paintin interfaceFlowBorder- Parameters:
figure- the flow figure whose border is being paintedg- the graphicswhere- the relative location of the boxsides- bits indicating sides and bidi orientation- See Also:
-