edu.umd.cs.piccolox.util
Class XYArray

java.lang.Object
  extended by edu.umd.cs.piccolox.util.XYArray
All Implemented Interfaces:
MutablePoints, Points

public class XYArray
extends java.lang.Object
implements MutablePoints


Constructor Summary
XYArray()
           
XYArray(double[] points)
           
XYArray(int n)
           
 
Method Summary
 void addPoint(int pos, double x, double y)
           
 void addPoint(int pos, java.awt.geom.Point2D pt)
           
 void addPoints(int pos, Points pts)
           
 void addPoints(int pos, Points pts, int start, int end)
           
 void appendPoints(Points pts)
           
 java.lang.Object clone()
           
static XYArray copyPoints(Points pts)
           
 java.awt.geom.Rectangle2D getBounds(java.awt.geom.Rectangle2D dst)
           
 java.awt.geom.Point2D getPoint(int i, java.awt.geom.Point2D dst)
           
 int getPointCount()
           
 double getX(int i)
           
 double getY(int i)
           
static double[] initPoints(double[] points, int n, double[] old)
           
 void removeAllPoints()
           
 void removePoints(int pos, int num)
           
 void setPoint(int i, double x, double y)
           
 void setPoint(int i, java.awt.geom.Point2D pt)
           
 void setX(int i, double x)
           
 void setY(int i, double y)
           
 void transformPoints(java.awt.geom.AffineTransform t)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XYArray

public XYArray(double[] points)

XYArray

public XYArray(int n)

XYArray

public XYArray()
Method Detail

getPointCount

public int getPointCount()
Specified by:
getPointCount in interface Points

getX

public double getX(int i)
Specified by:
getX in interface Points

getY

public double getY(int i)
Specified by:
getY in interface Points

getPoint

public java.awt.geom.Point2D getPoint(int i,
                                      java.awt.geom.Point2D dst)
Specified by:
getPoint in interface Points

setX

public void setX(int i,
                 double x)

setY

public void setY(int i,
                 double y)

setPoint

public void setPoint(int i,
                     double x,
                     double y)
Specified by:
setPoint in interface MutablePoints

setPoint

public void setPoint(int i,
                     java.awt.geom.Point2D pt)

transformPoints

public void transformPoints(java.awt.geom.AffineTransform t)
Specified by:
transformPoints in interface MutablePoints

getBounds

public java.awt.geom.Rectangle2D getBounds(java.awt.geom.Rectangle2D dst)
Specified by:
getBounds in interface Points

initPoints

public static double[] initPoints(double[] points,
                                  int n,
                                  double[] old)

addPoints

public void addPoints(int pos,
                      Points pts,
                      int start,
                      int end)

addPoints

public void addPoints(int pos,
                      Points pts)

appendPoints

public void appendPoints(Points pts)

copyPoints

public static XYArray copyPoints(Points pts)

addPoint

public void addPoint(int pos,
                     double x,
                     double y)
Specified by:
addPoint in interface MutablePoints

addPoint

public void addPoint(int pos,
                     java.awt.geom.Point2D pt)

removePoints

public void removePoints(int pos,
                         int num)
Specified by:
removePoints in interface MutablePoints

removeAllPoints

public void removeAllPoints()

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object


Copyright 2005 by University of Maryland, College Park, MD 20742, USA All rights reserved.

Web Accessibility