1:
8:
9: package ;
10:
11: import ;
12: import ;
13: import ;
14: import ;
15: import ;
16: import ;
17: import ;
18: import ;
19: import ;
20: import ;
21:
22:
29: public abstract class AbstractGraphicsState implements Cloneable
30: {
31: Graphics2DImpl frontend;
32:
33: public void setFrontend(Graphics2DImpl frontend)
34: {
35: this.frontend = frontend;
36: }
37:
38: public void dispose()
39: {
40: frontend = null;
41: }
42:
43:
44:
45: public abstract void setColor(Color color);
46:
47: public abstract void setPaintMode();
48:
49: public abstract void setXORMode(Color altColor);
50:
51: public abstract void setFont(Font font);
52:
53: public abstract FontMetrics getFontMetrics(Font font);
54:
55: public abstract void setClip(Shape clip);
56:
57: public abstract Shape getClip();
58: public abstract Rectangle getClipBounds();
59:
60: public abstract void copyArea(int x, int y,
61: int width, int height,
62: int dx, int dy);
63:
64: public abstract void drawLine(int x1, int y1,
65: int x2, int y2);
66:
67: public abstract void fillRect(int x, int y,
68: int width, int height);
69:
70: public abstract void clearRect(int x, int y,
71: int width, int height);
72:
73: public abstract void drawRoundRect(int x, int y,
74: int width, int height,
75: int arcWidth, int arcHeight);
76:
77: public abstract void fillRoundRect(int x, int y,
78: int width, int height,
79: int arcWidth, int arcHeight);
80:
81: public abstract void drawOval(int x, int y,
82: int width, int height);
83:
84: public abstract void fillOval(int x, int y,
85: int width, int height);
86:
87: public abstract void drawArc(int x, int y,
88: int width, int height,
89: int startAngle, int arcAngle);
90:
91: public abstract void fillArc(int x, int y,
92: int width, int height,
93: int startAngle, int arcAngle);
94:
95: public abstract void drawPolyline(int[] xPoints, int[] yPoints,int nPoints);
96:
97: public abstract void drawPolygon(int[] xPoints, int[] yPoints, int nPoints);
98:
99: public abstract void fillPolygon(int[] xPoints, int[] yPoints, int nPoints);
100:
101: public abstract boolean drawImage(Image image, int x, int y,
102: ImageObserver observer);
103:
104:
105:
106:
107: public abstract void draw(Shape shape);
108:
109: public abstract void fill(Shape shape);
110:
111: public abstract boolean hit(Rectangle rect, Shape text, boolean onStroke);
112:
113: public abstract void drawString(String text, int x, int y);
114:
115: public abstract void drawString(String text, float x, float y);
116:
117: public abstract void translate(int x, int y);
118:
119: public abstract void translate(double tx, double ty);
120:
121: public abstract void rotate(double theta);
122:
123: public abstract void rotate(double theta, double x, double y);
124:
125: public abstract void scale(double scaleX, double scaleY);
126:
127: public abstract void shear(double shearX, double shearY);
128:
129: public Object clone ()
130: {
131: try
132: {
133: return super.clone ();
134: }
135: catch (CloneNotSupportedException ex)
136: {
137:
138: throw new InternalError ();
139: }
140: }
141: }