com.java4less.rchart.gc
Class Polygon

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by com.java4less.rchart.gc.Polygon
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class Polygon
extends java.util.Vector

list of points that represent a closed polygon

See Also:
Serialized Form

Constructor Summary
Polygon()
           
 
Method Summary
 void addPoint(int x, int y)
          add a point to the polygon
 boolean contains(int x, int y)
          does the polygon contain this point?
 int getX(int i)
          get x value of a given point
 int getY(int i)
          get y value of a given point
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

Polygon

public Polygon()
Method Detail

addPoint

public void addPoint(int x,
                     int y)
add a point to the polygon

Parameters:
x -
y -

getX

public int getX(int i)
get x value of a given point

Parameters:
i -
Returns:

getY

public int getY(int i)
get y value of a given point

Parameters:
i -
Returns:

contains

public boolean contains(int x,
                        int y)
does the polygon contain this point?

Returns: