Package org.eclipse.draw2d
Class SchemeBorder.Scheme
java.lang.Object
org.eclipse.draw2d.SchemeBorder.Scheme
- Direct Known Subclasses:
- ButtonBorder.ButtonScheme
- Enclosing class:
- SchemeBorder
Holds a set of information about a border, which can be changed to create a
 wide range of schemes. Provides support for border opacity, size, highlight
 side and shadow side colors.
- 
Field SummaryFields
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedScheme()Constructs a default border Scheme with no border sides.Constructs a border scheme with the specified colors.Constructs a border Scheme with the specified highlight and shadow colors.
- 
Method SummaryModifier and TypeMethodDescriptionprotected InsetsCalculates and returns the Insets for this border Scheme.protected booleanCalculates and retuns the opaque state of this border scheme.protected Color[]Returns the highlight colors of this border scheme as an array of Colors.protected InsetsReturns the Insets required by this Scheme.protected Color[]Returns the shadow colors of this border scheme as an array of Colors.protected voidinit()Calculates and initializes the properties of this border scheme.protected booleanisOpaque()Returns whether this border should be opaque or not.
- 
Field Details- 
highlightArrays of Colors, used for highlight and shadow effects
- 
shadow
 
- 
- 
Constructor Details- 
Schemeprotected Scheme()Constructs a default border Scheme with no border sides.- Since:
- 2.0
 
- 
SchemeConstructs a border Scheme with the specified highlight and shadow colors. The size of the border depends on the number of colors passed in for each parameter. Hightlight colors are used in the top and left sides of the border, and Shadow colors are used in the bottom and right sides of the border.- Parameters:
- highlight- the hightlight colors
- shadow- the shadow colors
- Since:
- 2.0
 
- 
SchemeConstructs a border scheme with the specified colors. The input colors serve as both highlight and shadow colors. The size of the border is the number of colors passed in as input. Hightlight colors are used in the top and left sides of the border, and Shadow colors are used in the bottom and right sides of the border.- Parameters:
- colors- the colors to be used for the border
- Since:
- 2.0
 
 
- 
- 
Method Details- 
calculateInsetsCalculates and returns the Insets for this border Scheme. The calculations depend on the number of colors passed in as input.- Returns:
- the Insets used by this border
- Since:
- 2.0
 
- 
calculateOpaqueprotected boolean calculateOpaque()Calculates and retuns the opaque state of this border scheme. Returnsfalseif any of the border colors arenull. This is done to prevent the appearance of underlying pixels since the border color isnull.- Returns:
- trueif this border is opaque
- Since:
- 2.0
 
- 
getHighlightReturns the highlight colors of this border scheme as an array of Colors.- Returns:
- the highlight colors
- Since:
- 2.0
 
- 
getInsetsReturns the Insets required by this Scheme.- Returns:
- the Insets
- Since:
- 2.0
 
- 
getShadowReturns the shadow colors of this border scheme as an array of Colors.- Returns:
- the shadow colors
- Since:
- 2.0
 
- 
initprotected void init()Calculates and initializes the properties of this border scheme.- Since:
- 2.0
 
- 
isOpaqueprotected boolean isOpaque()Returns whether this border should be opaque or not.- Returns:
- trueif this border is opaque
- Since:
- 2.0
 
 
-