KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > swingwt > awt > Polygon


1 /*
2    SwingWT
3    Copyright(c)2003-2004, R. Rawson-Tetley
4
5    For more information on distributing and using this program, please
6    see the accompanying "COPYING" file.
7
8    Contact me by electronic mail: bobintetley@users.sourceforge.net
9
10    $Log: Polygon.java,v $
11    Revision 1.2 2004/04/20 16:35:50 bobintetley
12    Code cleanup
13
14    Revision 1.1 2004/01/15 15:20:29 bobintetley
15    Java2D work
16
17
18 */

19
20 package swingwt.awt;
21
22 import swingwt.awt.geom.*;
23
24 public class Polygon implements Shape {
25
26     public int npoints;
27     public int xpoints[];
28     public int ypoints[];
29     protected Rectangle bounds;
30     
31     public Polygon() {
32     }
33     public Polygon(int xpoints[], int ypoints[], int npoints) {
34     }
35     public void reset() {
36     npoints = 0;
37     bounds = null;
38     }
39     public void invalidate() {
40     bounds = null;
41     }
42     public void translate(int deltaX, int deltaY) {
43     // FIXME: Implement
44
}
45     public void addPoint(int x, int y) {
46     // FIXME: Implement
47
}
48     public Rectangle getBounds() {
49     return getBoundingBox();
50     }
51     public Rectangle getBoundingBox() {
52     return null;
53     }
54     public boolean contains(Point p) {
55     return contains(p.x, p.y);
56     }
57     public boolean contains(int x, int y) {
58     return contains((double) x, (double) y);
59     }
60     public boolean inside(int x, int y) {
61     return contains((double) x, (double) y);
62     }
63     public Rectangle2D getBounds2D() {
64     return getBounds();
65     }
66     public boolean contains(double x, double y) {
67         // FIXME: Implement
68
return false;
69     }
70     
71     public boolean contains(Point2D p) {
72         // FIXME: Implement
73
return false;
74     }
75     public boolean intersects(double x, double y, double w, double h) {
76         // FIXME: Implement
77
return false;
78     }
79     public boolean intersects(Rectangle2D r) {
80     return intersects(r.getX(), r.getY(), r.getWidth(), r.getHeight());
81     }
82     public boolean contains(double x, double y, double w, double h) {
83     // FIXME: Implement
84
return false;
85     }
86     public boolean contains(Rectangle2D r) {
87     return contains(r.getX(), r.getY(), r.getWidth(), r.getHeight());
88     }
89     public PathIterator getPathIterator(AffineTransform at) {
90     return null;
91     }
92     public PathIterator getPathIterator(AffineTransform at, double flatness) {
93     return null;
94     }
95 }
Popular Tags