|
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
public abstract class AbstractPointListShape
Base superclass for all polylines/polygons
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 |
---|
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 | |
---|---|
AbstractPointListShape()
|
Method Summary | |
---|---|
void |
addPoint(Point pt)
Adds the passed point to this figure. |
protected boolean |
childrenContainsPoint(int x,
int y)
Returns true if the point (x, y) is contained
within one of the child figures. |
boolean |
containsPoint(int x,
int y)
Returns true if the point (x, y) is contained within this
IFigure's bounds. |
Point |
getEnd()
Returns the last point in this Figure. |
PointList |
getPoints()
Returns the points in this figure by reference. |
Point |
getStart()
|
void |
insertPoint(Point pt,
int index)
Inserts a given point at a specified index in this figure. |
void |
removeAllPoints()
Erases this figure and removes all of its Points . |
void |
removePoint(int index)
Removes a point from this figure. |
void |
setEnd(Point end)
Sets the end point of this figure |
void |
setEndpoints(Point start,
Point end)
Sets the points at both extremes of this figure |
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 abstract 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.Shape |
---|
fillShape, getAlpha, getAntialias, getLineAttributes, getLineCap, getLineDash, getLineDashOffset, getLineJoin, getLineMiterLimit, getLineStyle, getLineWidth, getLineWidthFloat, outlineShape, paintFigure, setAlpha, setAlpha, setAntialias, setAntialias, setFill, setFillXOR, setLineAttributes, setLineCap, setLineDash, setLineDashOffset, setLineJoin, setLineMiterLimit, setLineStyle, setLineWidth, 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 AbstractPointListShape()
Method Detail |
---|
public boolean containsPoint(int x, int y)
IFigure
true
if the point (x, y)
is contained within this
IFigure's bounds.
containsPoint
in interface IFigure
containsPoint
in class Figure
x
- The X coordinatey
- The Y coordinate
true
if the point (x,y) is contained in this IFigure's boundsIFigure.containsPoint(int, int)
protected boolean childrenContainsPoint(int x, int y)
true
if the point (x, y)
is contained
within one of the child figures.
x
- The X coordinatey
- The Y coordinate
true
if the point (x,y) is contained in one of the
child figuresprotected abstract boolean shapeContainsPoint(int x, int y)
true
if the point (x, y)
is contained
within this figure.
x
- The X coordinatey
- The Y coordinate
true
if the point (x,y) is contained in this figurepublic void addPoint(Point pt)
pt
- the Point to be added to this figurepublic Point getStart()
public Point getEnd()
public PointList getPoints()
setPoints(PointList)
. Failure to do so will result in layout and paint
problems.
public void insertPoint(Point pt, int index)
pt
- the point to be addedindex
- the position in this figure where the point is to be addedpublic void removeAllPoints()
Points
.
public void removePoint(int index)
index
- the position of the point to be removedpublic void setStart(Point start)
start
- the point that will become the first point in this figurepublic void setEnd(Point end)
end
- the point that will become the last point in this figurepublic void setEndpoints(Point start, Point end)
start
- the point to become the first point in this figureend
- the point to become the last point in this figurepublic void setPoint(Point pt, int index)
index
to the Point pt
. If
you're going to set multiple Points, use setPoints(PointList)
.
pt
- the pointindex
- the indexpublic void setPoints(PointList points)
points
- new set of points
|
Eclipse Draw2d 3.3 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |