|
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.Polyline
Renders a PointList as a series of line segments. A Polyline figure should be
positioned by manipulating its points, NOT by calling
Figure.setBounds(Rectangle).
A polyline's bounds will be calculated automatically based on its PointList. The bounds will be the smallest Rectangle large enough to render the line properly. Children should not be added to a Polyline and will not affect the bounds calculation.
| 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 | |
Polyline()
|
|
| Method Summary | |
boolean |
containsPoint(int x,
int y)
Returns true if the point (x, y) is contained within this
IFigure's bounds. |
protected void |
fillShape(Graphics g)
Null implementation for a line. |
Rectangle |
getBounds()
Returns the smallest rectangle completely enclosing the figure. |
boolean |
isOpaque()
Returns true if this IFigure is opaque. |
protected void |
outlineShape(Graphics g)
Outlines this shape using the foreground color. |
void |
primTranslate(int x,
int y)
Translates this Figure's bounds, without firing a move. |
void |
removeAllPoints()
Erases the Polyline and removes all of its Points. |
void |
repaint()
Repaints this IFigure. |
void |
setLineWidth(int w)
Sets the line width to be used to outline the shape. |
void |
setPoints(PointList points)
Sets the list of points to be used by this polyline connection. |
void |
setTolerance(int tolerance)
Sets the tolerance |
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 |
addPoint, childrenContainsPoint, getEnd, getPoints, getStart, insertPoint, removePoint, setEnd, setEndpoints, setPoint, setStart |
| 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 Polyline()
| Method Detail |
public boolean containsPoint(int x,
int y)
IFiguretrue if the point (x, y) is contained within this
IFigure's bounds.
containsPoint in interface IFigurecontainsPoint in class AbstractPointListShapeIFigure.containsPoint(int, int)
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 g)
fillShape in class Shapeg - the graphics objectShape.fillShape(Graphics)public Rectangle getBounds()
Figure
getBounds in interface IFiguregetBounds in class FigureIFigure.getBounds()public boolean isOpaque()
IFiguretrue if this IFigure is opaque.
isOpaque in interface IFigureisOpaque in class Figurefalse because Polyline's aren't filledIFigure.isOpaque()protected void outlineShape(Graphics g)
Shape
outlineShape in class Shapeg - the graphics objectShape.outlineShape(Graphics)
public void primTranslate(int x,
int y)
Figure
primTranslate in class Figurex - The amount to translate horizontallyy - The amount to translate verticallyFigure.primTranslate(int, int)public void removeAllPoints()
Points.
removeAllPoints in class AbstractPointListShapepublic void setLineWidth(int w)
Shape
setLineWidth in class Shapew - the new widthShape.setLineWidth(int)public void setPoints(PointList points)
setPoints in class AbstractPointListShapepoints - new set of pointspublic void setTolerance(int tolerance)
tolerance - the new tolerance value of the Polylinepublic void repaint()
IFigure
repaint in interface IFigurerepaint in class FigureIFigure.repaint()
|
Eclipse Draw2d 3.3 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||