|
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
|
protected int |
lineWidth
|
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)
|
int |
getLineStyle()
|
int |
getLineWidth()
|
boolean |
isOpaque()
Returns the opaque state of this shape. |
protected abstract void |
outlineShape(Graphics graphics)
|
void |
paintFigure(Graphics graphics)
Paints this Figure's primary representation, or background. |
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 by 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)
public int getLineStyle()
public int getLineWidth()
public boolean isOpaque()
isOpaque
in interface IFigure
isOpaque
in class Figure
false
as shapes only
draw themselves onto other figures, and
generally dont have rectangular dimensions.IFigure.isOpaque()
protected abstract void outlineShape(Graphics graphics)
public void paintFigure(Graphics graphics)
Figure
Figure.paintClientArea(Graphics)
and Figure.paintBorder(Graphics)
. Furthermore, it is safe
to call graphics.restoreState()
within this method, and doing so will
restore the graphics to its original state upon entry.
paintFigure
in class Figure
graphics
- The Graphics used to paintpublic void setFill(boolean b)
b
- Fill state.public void setFillXOR(boolean b)
public void setLineWidth(int w)
w
- Width of the line to be used.public void setLineStyle(int s)
s
- Line style.public void setOutline(boolean b)
b
- Outline state of the shape.public void setOutlineXOR(boolean b)
b
- XOR based outline usage state.public void setXOR(boolean b)
b
- XOR based usage state.
|
Eclipse Draw2d 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |