Eclipse Draw2d 3.3

## 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.

Nested Class Summary

Nested classes inherited from class org.eclipse.draw2d.SchemeBorder
`SchemeBorder.Scheme, SchemeBorder.SCHEMES`

Nested classes inherited from class org.eclipse.draw2d.ColorConstants
`ColorConstants.SystemColorFactory`

Field Summary
`protected static Insets` `INSETS` The insets
`static Border` `singleton` The singleton instance of this class

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, gray, green, lightBlue, lightGray, lightGreen, listBackground, listForeground, 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 used by this border.
`boolean` `isOpaque()` Returns the opaque state of this border.
`void` `paint(IFigure figure, Graphics g, Insets insets)` Paints 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

  The singleton instance of this class

### INSETS

    protected static final Insets INSETS

  The 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)

  Returns the Insets used by this border. This is a constant value of two pixels in each direction.

  Specified by:
    `getInsets` in interface `Border`
  Overrides:
    `getInsets` in class `SchemeBorder`
  See Also:
    `Border.getInsets(IFigure)`

### isOpaque

    public boolean isOpaque()

  Returns the opaque state of this border. This border is opaque and takes responsibility to fill the region it encloses.

  Specified by:
    `isOpaque` in interface `Border`
  Overrides:
    `isOpaque` in class `SchemeBorder`
  See Also:
    `Border.isOpaque()`

### paint

    public void paint(IFigure figure,
                      Graphics g,
                      Insets insets)

  Description copied from interface: `Border`
  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)`.

  Specified by:
    `paint` in interface `Border`
  Overrides:
    `paint` in class `SchemeBorder`
  See Also:
    `Border.paint(IFigure, Graphics, Insets)`

Eclipse Draw2d 3.3

Copyright (c) IBM Corp. and others 2000, 2007. All Rights Reserved.