Draw2D v2.0

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.


Inner classes inherited from class org.eclipse.draw2d.SchemeBorder
SchemeBorder.Scheme, SchemeBorder.SCHEMES
 
Field Summary
protected static Insets INSETS
           
static Border singleton
           
 
Fields inherited from class org.eclipse.draw2d.SchemeBorder
DARKER_LIGHTER, DARKEST_DARKER, LIGHTER_DARKER, scheme
 
Fields inherited from class org.eclipse.draw2d.AbstractBorder
tempRect
 
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.
 
Method Summary
 Insets getInsets(IFigure figure)
          Returns the Insets for this Border for the given Figure.
 boolean isOpaque()
          Returns true if the Border completely fills the region defined above in paint.
 void paint(IFigure figure, Graphics g, Insets insets)
          paint the Border.
 
Methods inherited from class org.eclipse.draw2d.SchemeBorder
getScheme, paint, setScheme
 
Methods inherited from class org.eclipse.draw2d.AbstractBorder
getPaintRectangle, getPreferredSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

singleton

public static final Border singleton

INSETS

protected static final Insets INSETS
Constructor Detail

SimpleEtchedBorder

protected SimpleEtchedBorder()
Constructs a default border having a two pixel wide border.
Since:
2.0
Method Detail

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

Draw2D v2.0