|
Eclipse Draw2d 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.draw2d.AbstractBorder
org.eclipse.draw2d.AbstractBackground
A special border which can paint both underneath and on top of a Figure. Normal borders only paint on top of a figure and its children. A background has the opportunity to paint both first, and optionally last.
WARNING: Experimental for 3.3. Clients should help validate the use cases of this new function.
| Field Summary |
| Fields inherited from class org.eclipse.draw2d.AbstractBorder |
tempRect |
| Constructor Summary | |
AbstractBackground()
|
|
| Method Summary | |
Insets |
getInsets(IFigure figure)
Returns the Insets for this Border for the given Figure. |
void |
paint(IFigure figure,
Graphics graphics,
Insets insets)
Paints the border. The border should paint inside figure's 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).
By default, this method is stubbed out for backgrounds which only paint
underneath a figure. |
void |
paintBackground(IFigure figure,
Graphics graphics,
Insets insets)
Called when this Background should paint. |
| Methods inherited from class org.eclipse.draw2d.AbstractBorder |
getPaintRectangle, getPreferredSize, isOpaque |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractBackground()
| Method Detail |
public Insets getInsets(IFigure figure)
figure - The figure this border belongs to
public 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).
By default, this method is stubbed out for backgrounds which only paint
underneath a figure.
figure - The figure this border belongs tographics - The graphics object used for paintinginsets - The insets
public void paintBackground(IFigure figure,
Graphics graphics,
Insets insets)
figure - The figure on which the background is being paintedgraphics - The graphicsinsets - Amount to inset from the figure's bounds
|
Eclipse Draw2d 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||