org.eclipse.draw2d
Class SimpleEtchedBorder
java.lang.Object
|
+--org.eclipse.draw2d.AbstractBorder
|
+--org.eclipse.draw2d.SchemeBorder
|
+--org.eclipse.draw2d.SimpleEtchedBorder
- All Implemented Interfaces:
- Border, ColorConstants
- public final class SimpleEtchedBorder
- extends SchemeBorder
Provides a two pixel wide constant sized border,
having an etched look.
| Fields inherited from interface org.eclipse.draw2d.ColorConstants |
black, blue, button, buttonDarker, buttonDarkest, buttonLightest, cyan, darkBlue, darkGray, darkGreen, display, gray, green, lightBlue, lightGray, lightGreen, menuBackground, menuBackgroundSelected, menuForeground, menuForegroundSelected, orange, red, titleBackground, titleForeground, titleGradient, titleInactiveBackground, titleInactiveForeground, titleInactiveGradient, tooltipBackground, tooltipForeground, white, yellow |
|
Constructor Summary |
protected |
SimpleEtchedBorder()
Constructs a default border having a two pixel wide
border. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
singleton
public static final Border singleton
INSETS
protected static final Insets INSETS
SimpleEtchedBorder
protected SimpleEtchedBorder()
- Constructs a default border having a two pixel wide
border.
- Since:
- 2.0
getInsets
public Insets getInsets(IFigure figure)
- Description copied from interface:
Border
- Returns the Insets for this Border for the given Figure.
- Overrides:
getInsets in class SchemeBorder
isOpaque
public boolean isOpaque()
- Description copied from interface:
Border
- Returns true if the Border completely fills the region defined
above in paint.
- Overrides:
isOpaque in class SchemeBorder
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);
- Overrides:
paint in class SchemeBorder