Package org.eclipse.draw2d
Class SchemeBorder
java.lang.Object
org.eclipse.draw2d.AbstractBorder
org.eclipse.draw2d.SchemeBorder
- All Implemented Interfaces:
- Border,- ColorConstants
- Direct Known Subclasses:
- ButtonBorder,- SimpleEtchedBorder,- SimpleLoweredBorder,- SimpleRaisedBorder
SchemeBorder allows the creation of borders based on
 
Schemes. A Scheme is a class whose only
 purpose is to carry border specific information. SchemeBorder renders the
 border based on the information given by the Scheme set to it.- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classHolds a set of information about a border, which can be changed to create a wide range of schemes.static interfaceInterface which defines some commonly used schemes for the border.Nested classes/interfaces inherited from interface org.eclipse.draw2d.ColorConstantsColorConstants.SystemColorFactory
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final Color[]protected static final Color[]Arrays of Colors, used for shadow or highlight effectsprotected static final Color[]protected SchemeBorder.SchemeTheSchemeBorder.Schemeassociated with this SchemeBorderFields inherited from class org.eclipse.draw2d.AbstractBordertempRectFields inherited from interface org.eclipse.draw2d.ColorConstantsblack, 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 SummaryConstructorsModifierConstructorDescriptionprotectedConstructs a default SchemeBorder with no scheme defined.SchemeBorder(SchemeBorder.Scheme scheme) Constructs a SchemeBorder with the Scheme given as input.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the Insets for this Border for the given Figure.protected SchemeBorder.SchemeReturns the scheme used by this border.booleanisOpaque()Returns the opaque state of this border.protected voidPaints the border using the information in the set Scheme and the inputs given.voidPaints the border.protected voidsetScheme(SchemeBorder.Scheme scheme) Sets the Scheme for this border to the Scheme given as input.Methods inherited from class org.eclipse.draw2d.AbstractBordergetPaintRectangle, getPreferredSize
- 
Field Details- 
schemeTheSchemeBorder.Schemeassociated with this SchemeBorder
- 
DARKEST_DARKERArrays of Colors, used for shadow or highlight effects
- 
LIGHTER_DARKER
- 
DARKER_LIGHTER
 
- 
- 
Constructor Details- 
SchemeBorderprotected SchemeBorder()Constructs a default SchemeBorder with no scheme defined.- Since:
- 2.0
 
- 
SchemeBorderConstructs a SchemeBorder with the Scheme given as input.- Parameters:
- scheme- the Scheme to be used by this border
- Since:
- 2.0
 
 
- 
- 
Method Details- 
getInsetsDescription copied from interface:BorderReturns the Insets for this Border for the given Figure.
- 
getSchemeReturns the scheme used by this border.- Returns:
- the Scheme used by this border
- Since:
- 2.0
 
- 
isOpaquepublic boolean isOpaque()Returns the opaque state of this border. Returnstrueindicating that this will fill in the area enclosed by the border.- Specified by:
- isOpaquein interface- Border
- Overrides:
- isOpaquein class- AbstractBorder
- Returns:
- trueif this border is opaque
- See Also:
 
- 
setSchemeSets the Scheme for this border to the Scheme given as input.- Parameters:
- scheme- the Scheme for this border
- Since:
- 2.0
 
- 
paintDescription copied from interface:BorderPaints 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).
- 
paintPaints the border using the information in the set Scheme and the inputs given. Side widths are determined by the number of colors in the Scheme for each side.- Parameters:
- graphics- the graphics object
- fig- the figure this border belongs to
- insets- the insets
- tl- the highlight (top/left) colors
- br- the shadow (bottom/right) colors
 
 
-