|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.draw2d.AbstractBorder | +--org.eclipse.draw2d.SchemeBorder
SchemeBorder allows the creation of borders based on
Schemes
. A
Nested Class Summary | |
static class |
SchemeBorder.Scheme
Holds a set of information about a border, which can be changed to create a wide range of schemes. |
static interface |
SchemeBorder.SCHEMES
Interface which defines some commonly used schemes for the border. |
Field Summary | |
protected static Color[] |
DARKER_LIGHTER
|
protected static Color[] |
DARKEST_DARKER
|
protected static Color[] |
LIGHTER_DARKER
|
protected SchemeBorder.Scheme |
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 |
SchemeBorder()
Constructs a default SchemeBorder with no scheme defined. |
|
SchemeBorder(SchemeBorder.Scheme scheme)
Constructs a SchemeBorder with the Scheme given as input. |
Method Summary | |
Insets |
getInsets(IFigure figure)
Returns the Insets for this Border for the given Figure. |
protected SchemeBorder.Scheme |
getScheme()
Returns the scheme used by this border. |
boolean |
isOpaque()
Returns true if the Border completely fills the region defined in
paint(IFigure, Graphics, Insets) . |
protected void |
paint(Graphics graphics,
IFigure fig,
Insets insets,
Color[] tl,
Color[] br)
|
void |
paint(IFigure figure,
Graphics g,
Insets insets)
Paints the border. |
protected void |
setScheme(SchemeBorder.Scheme scheme)
Sets the Scheme for this border to the Scheme given as input. |
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 |
protected SchemeBorder.Scheme scheme
protected static final Color[] DARKEST_DARKER
protected static final Color[] LIGHTER_DARKER
protected static final Color[] DARKER_LIGHTER
Constructor Detail |
protected SchemeBorder()
public SchemeBorder(SchemeBorder.Scheme scheme)
Method Detail |
public Insets getInsets(IFigure figure)
Border
getInsets
in interface Border
figure
- The figure this border belongs to
protected SchemeBorder.Scheme getScheme()
public boolean isOpaque()
Border
true
if the Border completely fills the region defined in
Border.paint(IFigure, Graphics, Insets)
.
isOpaque
in interface Border
isOpaque
in class AbstractBorder
Border.isOpaque()
protected void setScheme(SchemeBorder.Scheme scheme)
scheme
- Scheme for this border.getScheme()
public void paint(IFigure figure, Graphics g, Insets insets)
Border
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)
.
paint
in interface Border
figure
- The figure this border belongs tog
- The graphics object used for paintinginsets
- The insetsprotected void paint(Graphics graphics, IFigure fig, Insets insets, Color[] tl, Color[] br)
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |