|
Draw2d 3.9.0.201308190730 |
|||||||||
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
Deprecated. Use setLineStyle(int) instead. |
protected int |
lineWidth
Deprecated. Use setLineWidth(int) or
setLineWidthFloat(float) instead. |
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. |
java.lang.Integer |
getAlpha()
|
java.lang.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(java.lang.Integer value)
|
void |
setAntialias(int value)
|
void |
setAntialias(java.lang.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
setLineWidth(int)
or
setLineWidthFloat(float)
instead.
protected int lineStyle
setLineStyle(int)
instead.
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 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 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 java.lang.Integer getAlpha()
public java.lang.Integer getAntialias()
public LineAttributes getLineAttributes()
Performance note: creates and returns a clone.
public int getLineWidth()
public float getLineWidthFloat()
LineAttributes.width
public int getLineJoin()
LineAttributes.join
public int getLineCap()
LineAttributes.cap
public int getLineStyle()
LineAttributes.style
public float[] getLineDash()
LineAttributes.dash
public float getLineDashOffset()
LineAttributes.dashOffset
public float getLineMiterLimit()
LineAttributes.miterLimit
public void setAlpha(java.lang.Integer value)
public void setAlpha(int value)
public void setAntialias(java.lang.Integer value)
value
- GC.setAntialias(int)
public void setAntialias(int value)
public void setLineAttributes(LineAttributes la)
la
- LineAttributes
public void setLineWidth(int w)
w
- the new widthpublic void setLineWidthFloat(float value)
value
- LineAttributes.width
public void setLineJoin(int join)
join
- LineAttributes.join
public void setLineCap(int cap)
cap
- LineAttributes.cap
public void setLineStyle(int style)
style
- the new line styleLineAttributes.style
public void setLineDash(float[] dash)
dash
- LineAttributes.dash
public void setLineDashOffset(float dashOffset)
dashOffset
- LineAttributes.dashOffset
public void setLineMiterLimit(float miterLimit)
miterLimit
- LineAttributes.miterLimit
|
Draw2d 3.9.0.201308190730 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |