Draw2D v2.0

org.eclipse.draw2d
Class AbstractBorder

java.lang.Object
  |
  +--org.eclipse.draw2d.AbstractBorder
All Implemented Interfaces:
Border
Direct Known Subclasses:
AbstractLabeledBorder, CompoundBorder, FocusBorder, LineBorder, MarginBorder, SchemeBorder

public abstract class AbstractBorder
extends Object
implements Border

Provides generic support for borders.


Field Summary
protected static Rectangle tempRect
           
 
Constructor Summary
AbstractBorder()
           
 
Method Summary
protected static Rectangle getPaintRectangle(IFigure f, Insets insets)
          Returns the region of f with its border removed, I.E.
 Dimension getPreferredSize(IFigure f)
          Returns the preferred width and height that this border would like to display itself properly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.draw2d.Border
getInsets, isOpaque, paint
 

Field Detail

tempRect

protected static Rectangle tempRect
Constructor Detail

AbstractBorder

public AbstractBorder()
Method Detail

getPaintRectangle

protected static final Rectangle getPaintRectangle(IFigure f,
                                                   Insets insets)
Returns the region of f with its border removed, I.E. the paintable region of f.
Parameters:
f - Figure for which the paintable rectangle is needed.
insets - f's Insets.
Returns:
The paintable region of f.
Since:
2.0

getPreferredSize

public Dimension getPreferredSize(IFigure f)
Description copied from interface: Border
Returns the preferred width and height that this border would like to display itself properly.
Specified by:
getPreferredSize in interface Border

Draw2D v2.0