org.eclipse.draw2d
Class GroupBoxBorder
java.lang.Object
|
+--org.eclipse.draw2d.AbstractBorder
|
+--org.eclipse.draw2d.AbstractLabeledBorder
|
+--org.eclipse.draw2d.GroupBoxBorder
- All Implemented Interfaces:
- Border, LabeledBorder
- public class GroupBoxBorder
- extends AbstractLabeledBorder
A labeled border intended to house a Figure with a group of children.
The label should serve as a description of the group.
|
Constructor Summary |
GroupBoxBorder()
Constructs a GroupBoxBorder with the name of this
class as its label. |
GroupBoxBorder(String s)
Constructs a GroupBoxBorder with label s. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroupBoxBorder
public GroupBoxBorder()
- Constructs a GroupBoxBorder with the name of this
class as its label.
- Since:
- 2.0
GroupBoxBorder
public GroupBoxBorder(String s)
- Constructs a GroupBoxBorder with label s.
- Since:
- 2.0
calculateInsets
protected Insets calculateInsets(IFigure figure)
- Calculates and returns the Insets for this GroupBoxBorder.
- Overrides:
calculateInsets in class AbstractLabeledBorder
- Parameters:
figure - IFigure on which the calculations
should be made. Generally this is the
IFigure of which this GroupBoxBorder is surrounding.- Returns:
- The Insets for this GroupBoxBorder.
- Since:
- 2.0
getPreferredSize
public Dimension getPreferredSize(IFigure fig)
- Description copied from interface:
Border
- Returns the preferred width and height that this border
would like to display itself properly.
- Overrides:
getPreferredSize in class AbstractLabeledBorder
isOpaque
public boolean isOpaque()
- Description copied from interface:
Border
- Returns true if the Border completely fills the region defined
above in paint.
paint
public void paint(IFigure figure,
Graphics g,
Insets insets)
- Description copied from interface:
Border
- paint the Border. The border should paint inside figure's
getBounds(), inset by the parameter insets. The border
generally should not paint inside its own insets.
More specifically, Border b should paint inside the rectangle:
figure.getBounds().getCropped(insets)
and outside of the rectangle:
figure.getBounds().getCropped(insets).getCropped(getInsets())
where inside is defined as rectangle.contains(x,y);