Package 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
Provides a two pixel wide constant sized border, having an etched look.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.draw2d.SchemeBorder
SchemeBorder.Scheme, SchemeBorder.SCHEMES
Nested classes/interfaces inherited from interface org.eclipse.draw2d.ColorConstants
ColorConstants.SystemColorFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Insets
The insetsstatic final Border
The singleton instance of this classFields 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, lineForeground, listBackground, listForeground, listHoverBackgroundColor, listSelectedBackgroundColor, menuBackground, menuBackgroundSelected, menuForeground, menuForegroundSelected, orange, red, titleBackground, titleForeground, titleGradient, titleInactiveBackground, titleInactiveForeground, titleInactiveGradient, tooltipBackground, tooltipForeground, white, yellow
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructs a default border having a two pixel wide border. -
Method Summary
Methods inherited from class org.eclipse.draw2d.SchemeBorder
getScheme, paint, setScheme
Methods inherited from class org.eclipse.draw2d.AbstractBorder
getPaintRectangle, getPreferredSize
-
Field Details
-
singleton
The singleton instance of this class -
INSETS
The insets
-
-
Constructor Details
-
SimpleEtchedBorder
protected SimpleEtchedBorder()Constructs a default border having a two pixel wide border.- Since:
- 2.0
-
-
Method Details
-
getInsets
Returns the Insets used by this border. This is a constant value of two pixels in each direction.- Specified by:
getInsets
in interfaceBorder
- Overrides:
getInsets
in classSchemeBorder
- Parameters:
figure
- The figure this border belongs to- Returns:
- The insets
- See Also:
-
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 interfaceBorder
- Overrides:
isOpaque
in classSchemeBorder
- Returns:
true
if this border is opaque- See Also:
-
paint
Description copied from interface:Border
Paints the border. The border should paint inside figure'sIFigure.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 asRectangle.contains(int, int)
.- Specified by:
paint
in interfaceBorder
- Overrides:
paint
in classSchemeBorder
- Parameters:
figure
- The figure this border belongs tog
- The graphics object used for paintinginsets
- The insets- See Also:
-