|
Draw2D v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.eclipse.draw2d.Figure
|
+--org.eclipse.draw2d.Shape
|
+--org.eclipse.draw2d.Polyline
Provides for graphical lines comprised of Points.
| Inner classes inherited from class org.eclipse.draw2d.Figure |
Figure.FigureIterator |
| Inner classes inherited from class org.eclipse.draw2d.IFigure |
IFigure.NoInsets |
| 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 | |
void |
addPoint(Point pt)
Adds the passed point to the Polyline. |
boolean |
containsPoint(int x,
int y)
Returns true if the point (x, y) is contained
within this IFigures bounds. |
protected void |
fillShape(Graphics g)
|
Rectangle |
getBounds()
Returns the smallest rectangle completely enclosing the figure. |
Point |
getEnd()
Returns the last point in the Polyline. |
protected PointList |
getPoints()
Returns the points in this Polyline by reference. |
Point |
getStart()
Returns the first point in the Polyline. |
void |
insertPoint(Point pt,
int index)
Inserts a given point at a specified index in the Polyline. |
boolean |
isOpaque()
Returns the opaque state of this shape. |
protected void |
outlineShape(Graphics g)
|
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 |
removePoint(int index)
Removes a point from the Polyline. |
void |
setEnd(Point end)
Sets the end point of the Polyline |
void |
setEndpoints(Point start,
Point end)
Sets the points at both extremes of the Polyline |
void |
setLineWidth(int w)
Sets the line width to be used by 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 polyline connection. |
void |
setStart(Point start)
Sets the start point of the Polyline |
protected boolean |
useLocalCoordinates()
Returns true if this figure uses local coordinates. |
| Methods inherited from class org.eclipse.draw2d.Shape |
getLineStyle, getLineWidth, paintFigure, setFill, setFillXOR, setLineStyle, 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 void addPoint(Point pt)
pt - The Point to be added to the Polyline.
public boolean containsPoint(int x,
int y)
IFigure(x, y) is contained
within this IFigures bounds.containsPoint in class Figureprotected void fillShape(Graphics g)
fillShape in class Shapepublic Rectangle getBounds()
IFiguregetBounds in class Figurepublic Point getEnd()
protected PointList getPoints()
setPoints(PointList). Failure to do so will result in
layout and paint problems.public Point getStart()
public void insertPoint(Point pt,
int index)
pt - The point to be addedindex - The position in the Polyline where the
point is to be added.public boolean isOpaque()
ShapeisOpaque in class Shapeorg.eclipse.draw2d.Shapefalse as shapes only
draw themselves onto other figures, and
generally dont have rectangular dimensions.protected void outlineShape(Graphics g)
outlineShape in class Shape
public void primTranslate(int x,
int y)
FigureprimTranslate in class Figureorg.eclipse.draw2d.FigureFigure.translate(int, int)public void removeAllPoints()
Points.public void removePoint(int index)
index - The position of the point to be removed.public void setEnd(Point end)
end - The point that will become the last point
in the Polyline.
public void setEndpoints(Point start,
Point end)
start - The point to become the first point in the Polyline.end - The point to become the last point in the Polyline.public void setLineWidth(int w)
ShapesetLineWidth in class Shapeorg.eclipse.draw2d.Shapew - Width of the line to be used.
public void setPoint(Point pt,
int index)
index to the Point
pt. Calling this method results in a
repaint. If you're going to set multiple Points,
use setPoints(PointList).public void setPoints(PointList points)
points - New set of points.public void setStart(Point start)
start - The point that will become the first point
in the Polyline.protected boolean useLocalCoordinates()
Figuretrue if this figure uses local coordinates. This
means its children are placed relative to this figure's top-left corner.useLocalCoordinates in class Figure
|
Draw2D v2.0 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||