|
Eclipse Draw2d 3.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.draw2d.Figure
org.eclipse.draw2d.Shape
public abstract class Shape
Provides abstract support for a variety of shapes.
When customizing shapes, you shouldn't override paintFigure(). Override fillShape() and outlineShape() methods instead.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure |
|---|
Figure.FigureIterator, Figure.IdentitySearch |
| Nested classes/interfaces inherited from interface 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. |
Integer |
getAlpha()
|
Integer |
getAntialias()
|
LineAttributes |
getLineAttributes()
Returns line attributes used when drawing this shape. |
int |
getLineCap()
Returns the line cap style of this shape's outline. |
float[] |
getLineDash()
Returns the line dash style of this shape's outline. |
float |
getLineDashOffset()
Returns the line dash offset of this shape's outline. |
int |
getLineJoin()
Returns the line join style of this shape's outline. |
float |
getLineMiterLimit()
Returns the line dash miter limit of this shape's outline. |
int |
getLineStyle()
Returns the line style of this shape's outline. |
int |
getLineWidth()
Returns the line width of this shape's outline. |
float |
getLineWidthFloat()
Returns the line width of this shape's outline. |
protected abstract void |
outlineShape(Graphics graphics)
Outlines this shape using the foreground color. |
void |
paintFigure(Graphics graphics)
Paints the shape. |
void |
setAlpha(int value)
|
void |
setAlpha(Integer value)
|
void |
setAntialias(int value)
|
void |
setAntialias(Integer value)
|
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 |
setLineAttributes(LineAttributes la)
Sets all line attributes at once. |
void |
setLineCap(int cap)
Sets the line cap style of this shape's outline. |
void |
setLineDash(float[] dash)
Sets the line dash style of this shape's outline. |
void |
setLineDashOffset(float dashOffset)
Sets the line dash offset of this shape's outline. |
void |
setLineJoin(int join)
Sets the line join style of this shape's outline. |
void |
setLineMiterLimit(float miterLimit)
Sets the line dash miter limit of this shape's outline. |
void |
setLineStyle(int style)
Sets the line style of this shape's outline. |
void |
setLineWidth(int w)
Sets the line width to be used to outline the shape. |
void |
setLineWidthFloat(float value)
Sets the line width of this shape's outline. |
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 objectprotected abstract void outlineShape(Graphics graphics)
graphics - the graphics objectpublic void paintFigure(Graphics graphics)
paintFigure in class Figuregraphics - The Graphics used to paintFigure.paintFigure(Graphics)public void setFill(boolean b)
b - fill statepublic void setFillXOR(boolean b)
b - XOR fill statepublic 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'edpublic Integer getAlpha()
public Integer getAntialias()
public LineAttributes getLineAttributes()
Performance note: creates and returns a clone.public int getLineWidth()
public float getLineWidthFloat()
LineAttributespublic int getLineJoin()
LineAttributespublic int getLineCap()
LineAttributespublic int getLineStyle()
LineAttributespublic float[] getLineDash()
LineAttributespublic float getLineDashOffset()
LineAttributespublic float getLineMiterLimit()
LineAttributespublic void setAlpha(Integer value)
public void setAlpha(int value)
public void setAntialias(Integer value)
value - GCpublic void setAntialias(int value)
public void setLineAttributes(LineAttributes la)
la - LineAttributespublic void setLineWidth(int w)
w - the new widthpublic void setLineWidthFloat(float value)
value - LineAttributespublic void setLineJoin(int join)
join - LineAttributespublic void setLineCap(int cap)
cap - LineAttributespublic void setLineStyle(int style)
style - the new line styleLineAttributespublic void setLineDash(float[] dash)
dash - LineAttributespublic void setLineDashOffset(float dashOffset)
dashOffset - LineAttributespublic void setLineMiterLimit(float miterLimit)
miterLimit - LineAttributes
|
Eclipse Draw2d 3.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||