swingwt.awt
Class Polygon

java.lang.Object
  extended byswingwt.awt.Polygon
All Implemented Interfaces:
Shape

public class Polygon
extends java.lang.Object
implements Shape


Field Summary
protected  Rectangle bounds
           
 int npoints
           
 int[] xpoints
           
 int[] ypoints
           
 
Constructor Summary
Polygon()
           
Polygon(int[] xpoints, int[] ypoints, int npoints)
           
 
Method Summary
 void addPoint(int x, int y)
           
 boolean contains(double x, double y)
           
 boolean contains(double x, double y, double w, double h)
           
 boolean contains(int x, int y)
           
 boolean contains(Point p)
           
 boolean contains(Point2D p)
           
 boolean contains(Rectangle2D r)
           
 Rectangle getBoundingBox()
           
 Rectangle getBounds()
           
 Rectangle2D getBounds2D()
           
 PathIterator getPathIterator(AffineTransform at)
           
 PathIterator getPathIterator(AffineTransform at, double flatness)
           
 boolean inside(int x, int y)
           
 boolean intersects(double x, double y, double w, double h)
           
 boolean intersects(Rectangle2D r)
           
 void invalidate()
           
 void reset()
           
 void translate(int deltaX, int deltaY)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

npoints

public int npoints

xpoints

public int[] xpoints

ypoints

public int[] ypoints

bounds

protected Rectangle bounds
Constructor Detail

Polygon

public Polygon()

Polygon

public Polygon(int[] xpoints,
               int[] ypoints,
               int npoints)
Method Detail

reset

public void reset()

invalidate

public void invalidate()

translate

public void translate(int deltaX,
                      int deltaY)

addPoint

public void addPoint(int x,
                     int y)

getBounds

public Rectangle getBounds()
Specified by:
getBounds in interface Shape

getBoundingBox

public Rectangle getBoundingBox()

contains

public boolean contains(Point p)

contains

public boolean contains(int x,
                        int y)

inside

public boolean inside(int x,
                      int y)

getBounds2D

public Rectangle2D getBounds2D()
Specified by:
getBounds2D in interface Shape

contains

public boolean contains(double x,
                        double y)
Specified by:
contains in interface Shape

contains

public boolean contains(Point2D p)
Specified by:
contains in interface Shape

intersects

public boolean intersects(double x,
                          double y,
                          double w,
                          double h)
Specified by:
intersects in interface Shape

intersects

public boolean intersects(Rectangle2D r)
Specified by:
intersects in interface Shape

contains

public boolean contains(double x,
                        double y,
                        double w,
                        double h)
Specified by:
contains in interface Shape

contains

public boolean contains(Rectangle2D r)
Specified by:
contains in interface Shape

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Specified by:
getPathIterator in interface Shape

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Specified by:
getPathIterator in interface Shape