org.eclipse.gmf.runtime.draw2d.ui.geometry
Class PrecisionPointList
java.lang.Object
org.eclipse.draw2d.geometry.PointList
org.eclipse.gmf.runtime.draw2d.ui.geometry.PrecisionPointList
-
All Implemented Interfaces:
- java.io.Serializable,
Translatable
-
public class PrecisionPointList
- extends
PointList
Class implementing a list of PrecisionPoint
similarly to
PointList
class.
-
See Also:
-
Serialized Form
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
PrecisionPointList
public PrecisionPointList()
- Constructs an empty PrecisionPointList.
PrecisionPointList
public PrecisionPointList(double[] points)
- Constructs a PointList with the given points.
-
Parameters:
-
points
- double array where two consecutive double form the coordinates of a point
PrecisionPointList
public PrecisionPointList(int size)
- Constructs a PrecisionPointList with initial capacity size, but no points.
-
Parameters:
-
size
- Number of points to hold.
PrecisionPointList
public PrecisionPointList(
PointList pointList)
addAll
public void addAll(
PrecisionPointList source)
- Appends all of the given points to this PrecisionPointList.
-
-
Parameters:
-
source
- the source PrecisionPointlist
addAll
public void addAll(
PointList source)
-
-
Overrides:
-
addAll
in class
PointList
-
addPoint
public void addPoint(
Point p)
-
-
Overrides:
-
addPoint
in class
PointList
-
addPrecisionPoint
public void addPrecisionPoint(double x,
double y)
- Adds the input point values to this PointList.
-
-
Parameters:
-
x
- X value of a point to add -
y
- Y value of a point to add
getBounds
public
Rectangle getBounds()
-
-
Overrides:
-
getBounds
in class
PointList
-
getCopy
public
PrecisionPointList getCopy()
-
-
Overrides:
-
getCopy
in class
PointList
-
getLastPoint
public
Point getLastPoint()
-
-
Overrides:
-
getLastPoint
in class
PointList
-
getMidpoint
public
Point getMidpoint()
-
-
Overrides:
-
getMidpoint
in class
PointList
-
getPoint
public
Point getPoint(int index)
-
-
Overrides:
-
getPoint
in class
PointList
-
getPoint
public
Point getPoint(
Point p,
int index)
-
-
Overrides:
-
getPoint
in class
PointList
-
insertPoint
public void insertPoint(
Point p,
int index)
-
-
Overrides:
-
insertPoint
in class
PointList
-
performScale
public void performScale(double factor)
-
-
Specified by:
-
performScale
in interface
Translatable
-
Overrides:
-
performScale
in class
PointList
-
performTranslate
public void performTranslate(int dx,
int dy)
-
-
Specified by:
-
performTranslate
in interface
Translatable
-
Overrides:
-
performTranslate
in class
PointList
-
removeAllPoints
public void removeAllPoints()
-
-
Overrides:
-
removeAllPoints
in class
PointList
-
removePoint
public
Point removePoint(int index)
-
-
Overrides:
-
removePoint
in class
PointList
-
reverse
public void reverse()
-
-
Overrides:
-
reverse
in class
PointList
-
setPoint
public void setPoint(
Point pt,
int index)
-
-
Overrides:
-
setPoint
in class
PointList
-
setSize
public void setSize(int newSize)
-
-
Overrides:
-
setSize
in class
PointList
-
size
public int size()
-
-
Overrides:
-
size
in class
PointList
-
toDoubleArray
public double[] toDoubleArray()
- Returns the contents of this PrecisionPointList as a double array. The returned array is by
reference. Any changes made to the array will also be changing the original PrecisionPointList.
-
-
Returns:
- the integer array of points by reference
toIntArray
public int[] toIntArray()
-
-
Overrides:
-
toIntArray
in class
PointList
-
translate
public void translate(int x,
int y)
-
-
Overrides:
-
translate
in class
PointList
-
transpose
public void transpose()
-
-
Overrides:
-
transpose
in class
PointList
-
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.