|
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.Figure | +--org.eclipse.draw2d.Shape
Provides abstract support for a variety of shapes.
Nested Class Summary |
Nested classes inherited from class org.eclipse.draw2d.Figure |
Figure.FigureIterator |
Nested classes inherited from class org.eclipse.draw2d.IFigure |
IFigure.NoInsets |
Field Summary | |
protected int |
lineStyle
The line style to be used for this shape's outline. |
protected int |
lineWidth
The width of this shape's outline. |
Fields inherited from class org.eclipse.draw2d.Figure |
bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip |
Fields inherited from interface org.eclipse.draw2d.IFigure |
MAX_DIMENSION, MIN_DIMENSION, NO_INSETS |
Constructor Summary | |
Shape()
Default constructor. |
Method Summary | |
protected abstract void |
fillShape(Graphics graphics)
Fills the interior of the shape with the background color. |
int |
getLineStyle()
Returns the line style used to outline this shape. |
int |
getLineWidth()
Returns the line width of this shape's outline. |
boolean |
isOpaque()
Returns false as shapes only draw themselves onto other figures, and
generally dont have rectangular dimensions. |
protected abstract void |
outlineShape(Graphics graphics)
Outlines this shape using the foreground color. |
void |
paintFigure(Graphics graphics)
Paints the shape. |
void |
setFill(boolean b)
Sets whether this shape should fill its region or not. |
void |
setFillXOR(boolean b)
Sets whether XOR based fill should be used by the shape. |
void |
setLineStyle(int s)
Sets the style of line to be used by this shape. |
void |
setLineWidth(int w)
Sets the line width to be used to outline the shape. |
void |
setOutline(boolean b)
Sets whether the outline should be drawn for this shape. |
void |
setOutlineXOR(boolean b)
Sets whether XOR based outline should be used for this shape. |
void |
setXOR(boolean b)
Sets whether XOR based fill and XOR based outline should be used for this shape. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int lineWidth
protected int lineStyle
Constructor Detail |
public Shape()
Method Detail |
protected abstract void fillShape(Graphics graphics)
graphics
- the graphics objectpublic int getLineStyle()
public int getLineWidth()
public boolean isOpaque()
false
as shapes only draw themselves onto other figures, and
generally dont have rectangular dimensions.
isOpaque
in interface IFigure
isOpaque
in class Figure
Figure.isOpaque()
protected abstract void outlineShape(Graphics graphics)
graphics
- the graphics objectpublic void paintFigure(Graphics graphics)
paintFigure
in class Figure
graphics
- The Graphics used to paintFigure.paintFigure(Graphics)
public void setFill(boolean b)
b
- fill statepublic void setFillXOR(boolean b)
b
- XOR fill statepublic void setLineWidth(int w)
w
- the new widthpublic void setLineStyle(int s)
s
- the new line stylepublic void setOutline(boolean b)
b
- true
if the shape should be outlinedpublic void setOutlineXOR(boolean b)
b
- true
if the outline should be XOR'edpublic void setXOR(boolean b)
b
- true
if the outline and fill should be XOR'ed
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |