|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.draw2d.AbstractBorder | +--org.eclipse.draw2d.AbstractLabeledBorder | +--org.eclipse.draw2d.GroupBoxBorder
A labeled border intended to house a Figure with a group of children. The label should serve as a description of the group.
Field Summary |
Fields inherited from class org.eclipse.draw2d.AbstractBorder |
tempRect |
Constructor Summary | |
GroupBoxBorder()
Constructs a GroupBoxBorder with the name of this class as its label. |
|
GroupBoxBorder(String s)
Constructs a GroupBoxBorder with label s. |
Method Summary | |
protected Insets |
calculateInsets(IFigure figure)
Calculates and returns the Insets for this GroupBoxBorder. |
Dimension |
getPreferredSize(IFigure fig)
Returns the preferred width and height that this border would like to display itself properly. |
void |
paint(IFigure figure,
Graphics g,
Insets insets)
Paints the border. |
Methods inherited from class org.eclipse.draw2d.AbstractLabeledBorder |
getFont, getInsets, getLabel, getTextColor, getTextExtents, invalidate, setFont, setLabel, setTextColor |
Methods inherited from class org.eclipse.draw2d.AbstractBorder |
getPaintRectangle, isOpaque |
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 |
isOpaque |
Constructor Detail |
public GroupBoxBorder()
public GroupBoxBorder(String s)
s
- the labelMethod Detail |
protected Insets calculateInsets(IFigure figure)
calculateInsets
in class AbstractLabeledBorder
figure
- IFigure on which the calculations should be made. Generally this is
the IFigure of which this GroupBoxBorder is surrounding.
public Dimension getPreferredSize(IFigure fig)
Border
getPreferredSize
in interface Border
getPreferredSize
in class AbstractLabeledBorder
Border.getPreferredSize(IFigure)
public void paint(IFigure figure, Graphics g, Insets insets)
Border
IFigure.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(int, int)
.
figure
- The figure this border belongs tog
- The graphics object used for paintinginsets
- The insetsBorder.paint(IFigure, Graphics, Insets)
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |