|
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
org.eclipse.draw2d.AbstractPointListShape
org.eclipse.draw2d.ScalablePolygonShape
Renders a PointList as a polygonal shape
scaled in accordance with bounds to fill whole figure.
This class is similar to PolygonShape, except the polygon should be
scaled expanded/compressed to fit in current bounds.
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.draw2d.Figure |
Figure.FigureIterator, Figure.IdentitySearch |
| Nested classes inherited from class org.eclipse.draw2d.IFigure |
IFigure.NoInsets |
| Field Summary |
| Fields inherited from class org.eclipse.draw2d.Shape |
lineStyle, 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 | |
ScalablePolygonShape()
|
|
| Method Summary | |
void |
addPoint(Point pt)
Adds the passed point to this figure. |
protected void |
fillShape(Graphics graphics)
Fills the interior of the shape with the background color. |
PointList |
getScaledPoints()
|
void |
insertPoint(Point pt,
int index)
Inserts a given point at a specified index in this figure. |
protected void |
outlineShape(Graphics graphics)
Outlines this shape using the foreground color. |
void |
removeAllPoints()
Erases this figure and removes all of its Points. |
void |
removePoint(int index)
Removes a point from this figure. |
void |
setBounds(Rectangle rect)
Sets the bounds of this Figure to the Rectangle rect. |
void |
setEnd(Point end)
Sets the end point of this figure |
void |
setLineWidth(int w)
Sets the line width to be used to outline the shape. |
void |
setPoint(Point pt,
int index)
Sets the point at index to the Point pt. |
void |
setPoints(PointList points)
Sets the list of points to be used by this figure. |
void |
setStart(Point start)
Sets the start point of this figure |
protected boolean |
shapeContainsPoint(int x,
int y)
Returns true if the point (x, y) is contained
within this figure. |
| Methods inherited from class org.eclipse.draw2d.AbstractPointListShape |
childrenContainsPoint, containsPoint, getEnd, getPoints, getStart, setEndpoints |
| Methods inherited from class org.eclipse.draw2d.Shape |
getAlpha, getAntialias, getLineAttributes, getLineCap, getLineDash, getLineDashOffset, getLineJoin, getLineMiterLimit, getLineStyle, getLineWidth, getLineWidthFloat, paintFigure, setAlpha, setAlpha, setAntialias, setAntialias, setFill, setFillXOR, setLineAttributes, setLineCap, setLineDash, setLineDashOffset, setLineJoin, setLineMiterLimit, setLineStyle, setLineWidthFloat, setOutline, setOutlineXOR, setXOR |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ScalablePolygonShape()
| Method Detail |
protected boolean shapeContainsPoint(int x,
int y)
AbstractPointListShapetrue if the point (x, y) is contained
within this figure.
shapeContainsPoint in class AbstractPointListShapex - The X coordinatey - The Y coordinate
true if the point (x,y) is contained in this figureprotected void fillShape(Graphics graphics)
Shape
fillShape in class Shapegraphics - the graphics objectprotected void outlineShape(Graphics graphics)
Shape
outlineShape in class Shapegraphics - the graphics objectpublic PointList getScaledPoints()
public void addPoint(Point pt)
AbstractPointListShape
addPoint in class AbstractPointListShapept - the Point to be added to this figure
public void insertPoint(Point pt,
int index)
AbstractPointListShape
insertPoint in class AbstractPointListShapept - the point to be addedindex - the position in this figure where the point is to be addedpublic void removeAllPoints()
AbstractPointListShapePoints.
removeAllPoints in class AbstractPointListShapepublic void removePoint(int index)
AbstractPointListShape
removePoint in class AbstractPointListShapeindex - the position of the point to be removedpublic void setStart(Point start)
AbstractPointListShape
setStart in class AbstractPointListShapestart - the point that will become the first point in this figurepublic void setEnd(Point end)
AbstractPointListShape
setEnd in class AbstractPointListShapeend - the point that will become the last point in this figure
public void setPoint(Point pt,
int index)
AbstractPointListShapeindex to the Point pt. If
you're going to set multiple Points, use AbstractPointListShape.setPoints(PointList).
setPoint in class AbstractPointListShapept - the pointindex - the indexpublic void setPoints(PointList points)
AbstractPointListShape
setPoints in class AbstractPointListShapepoints - new set of pointspublic void setBounds(Rectangle rect)
FigureFigure.getBounds() may return the
current bounds by reference, it is not safe to modify that Rectangle and then call
setBounds() after making modifications. The figure would assume that the bounds are
unchanged, and no layout or paint would occur. For proper behavior, always use a copy.
setBounds in interface IFiguresetBounds in class Figurerect - The new boundspublic void setLineWidth(int w)
Shape
setLineWidth in class Shapew - the new width
|
Eclipse Draw2d 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||