|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A Border is a graphical decoration that is painted just inside the outer edge of a Figure.
Method Summary | |
Insets |
getInsets(IFigure figure)
Returns the Insets for this Border for the given Figure. |
Dimension |
getPreferredSize(IFigure figure)
Returns the preferred width and height that this border would like to display itself properly. |
boolean |
isOpaque()
Returns true if the Border completely fills the region defined in
paint(IFigure, Graphics, Insets) . |
void |
paint(IFigure figure,
Graphics graphics,
Insets insets)
Paints the border. |
Method Detail |
public Insets getInsets(IFigure figure)
figure
- The figure this border belongs to
public Dimension getPreferredSize(IFigure figure)
figure
- The figure
public boolean isOpaque()
true
if the Border completely fills the region defined in
paint(IFigure, Graphics, Insets)
.
true
if this border is opaquepublic void paint(IFigure figure, Graphics graphics, Insets insets)
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 tographics
- The graphics object used for paintinginsets
- The insets
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |