comparison flys-artifacts/src/main/java/de/intevation/flys/java2d/NOPGraphics2D.java @ 3468:f37e7e8907cb

merged flys-artifacts/2.8.1
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:39 +0200
parents b7b424ae32a8
children
comparison
equal deleted inserted replaced
3387:5ffad8bde8ad 3468:f37e7e8907cb
1 package de.intevation.flys.java2d;
2
3 import java.util.Map;
4
5 import java.awt.Graphics;
6 import java.awt.Graphics2D;
7 import java.awt.Shape;
8 import java.awt.Image;
9 import java.awt.Color;
10 import java.awt.Composite;
11 import java.awt.Paint;
12 import java.awt.GraphicsConfiguration;
13 import java.awt.Stroke;
14 import java.awt.Rectangle;
15 import java.awt.Font;
16 import java.awt.FontMetrics;
17
18 import java.awt.image.RenderedImage;
19
20 import java.awt.image.BufferedImage;
21 import java.awt.image.BufferedImageOp;
22 import java.awt.image.ImageObserver;
23
24 import java.awt.image.renderable.RenderableImage;
25
26 import java.awt.geom.AffineTransform;
27
28 import java.text.AttributedCharacterIterator;
29
30 import java.awt.font.GlyphVector;
31 import java.awt.font.FontRenderContext;
32
33 import java.awt.RenderingHints;
34
35 public final class NOPGraphics2D
36 extends Graphics2D
37 {
38 private Graphics2D parent;
39
40 public NOPGraphics2D(Graphics2D parent) {
41 this.parent = parent;
42 }
43
44 @Override
45 public final void addRenderingHints(Map<?,?> hints) {
46 parent.addRenderingHints(hints);
47 }
48
49 @Override
50 public final void clip(Shape s) {
51 }
52
53 @Override
54 public final void draw(Shape s) {
55 }
56
57 @Override
58 public final void drawGlyphVector(GlyphVector g, float x, float y) {
59 }
60
61 @Override
62 public final void drawImage(
63 BufferedImage img,
64 BufferedImageOp op,
65 int x,
66 int y
67 ) {
68 }
69
70 @Override
71 public final boolean drawImage(
72 Image img,
73 AffineTransform xform,
74 ImageObserver obs
75 ) {
76 return true;
77 }
78
79 @Override
80 public final void drawRenderableImage(
81 RenderableImage img,
82 AffineTransform xform
83 ) {
84 }
85
86 @Override
87 public final void drawRenderedImage(
88 RenderedImage img,
89 AffineTransform xform
90 ) {
91 }
92
93 @Override
94 public final void drawString(
95 AttributedCharacterIterator iterator,
96 float x,
97 float y
98 ) {
99 }
100
101 @Override
102 public final void drawString(
103 AttributedCharacterIterator iterator,
104 int x,
105 int y
106 ) {
107 }
108
109 @Override
110 public final void drawString(String str, float x, float y) {
111 }
112
113 @Override
114 public final void drawString(String str, int x, int y) {
115 }
116
117 @Override
118 public final void fill(Shape s) {
119 }
120
121 @Override
122 public final Color getBackground() {
123 return parent.getBackground();
124 }
125
126 @Override
127 public final Composite getComposite() {
128 return parent.getComposite();
129 }
130
131 @Override
132 public final GraphicsConfiguration getDeviceConfiguration() {
133 return parent.getDeviceConfiguration();
134 }
135
136 @Override
137 public final FontRenderContext getFontRenderContext() {
138 return parent.getFontRenderContext();
139 }
140
141 @Override
142 public final Paint getPaint() {
143 return parent.getPaint();
144 }
145
146 @Override
147 public final Object getRenderingHint(RenderingHints.Key hintKey) {
148 return parent.getRenderingHint(hintKey);
149 }
150
151 @Override
152 public final RenderingHints getRenderingHints() {
153 return parent.getRenderingHints();
154 }
155
156 @Override
157 public final Stroke getStroke() {
158 return parent.getStroke();
159 }
160
161 @Override
162 public final AffineTransform getTransform() {
163 return parent.getTransform();
164 }
165
166 @Override
167 public final boolean hit(Rectangle rect, Shape s, boolean onStroke) {
168 return parent.hit(rect, s, onStroke);
169 }
170
171 @Override
172 public final void rotate(double theta) {
173 parent.rotate(theta);
174 }
175
176 @Override
177 public final void rotate(double theta, double x, double y) {
178 parent.rotate(theta);
179 }
180
181 @Override
182 public final void scale(double sx, double sy) {
183 parent.scale(sx, sy);
184 }
185
186 @Override
187 public final void setBackground(Color color) {
188 parent.setBackground(color);
189 }
190
191 @Override
192 public final void setComposite(Composite comp) {
193 parent.setComposite(comp);
194 }
195
196 @Override
197 public final void setPaint(Paint paint) {
198 parent.setPaint(paint);
199 }
200
201 @Override
202 public final void setRenderingHint(
203 RenderingHints.Key hintKey,
204 Object hintValue
205 ) {
206 parent.setRenderingHint(hintKey, hintValue);
207 }
208
209 @Override
210 public final void setRenderingHints(Map<?,?> hints) {
211 parent.setRenderingHints(hints);
212 }
213
214 @Override
215 public final void setStroke(Stroke s) {
216 parent.setStroke(s);
217 }
218
219 @Override
220 public final void setTransform(AffineTransform Tx) {
221 parent.setTransform(Tx);
222 }
223
224
225 @Override
226 public final void shear(double shx, double shy) {
227 parent.shear(shx, shy);
228 }
229
230 @Override
231 public final void transform(AffineTransform Tx) {
232 parent.transform(Tx);
233 }
234
235 @Override
236 public final void translate(double tx, double ty) {
237 parent.translate(tx, ty);
238 }
239
240 @Override
241 public final void translate(int tx, int ty) {
242 parent.translate(tx, ty);
243 }
244
245 @Override
246 public final void dispose() {
247 parent.dispose();
248 }
249
250 @Override
251 public final boolean drawImage(
252 Image img,
253 int x,
254 int y,
255 int width,
256 int height,
257 Color bgcolor,
258 ImageObserver observer
259 ) {
260 return true;
261 }
262
263 @Override
264 public final boolean drawImage(
265 Image img,
266 int dx1,
267 int dy1,
268 int dx2,
269 int dy2,
270 int sx1,
271 int sy1,
272 int sx2,
273 int sy2,
274 Color bgcolor,
275 ImageObserver observer
276 ) {
277 return true;
278 }
279
280 @Override
281 public final boolean drawImage(
282 Image img,
283 int dx1,
284 int dy1,
285 int dx2,
286 int dy2,
287 int sx1,
288 int sy1,
289 int sx2,
290 int sy2,
291 ImageObserver observer
292 ) {
293 return true;
294 }
295
296 @Override
297 public final boolean drawImage(
298 Image img,
299 int x,
300 int y,
301 Color bgcolor,
302 ImageObserver observer
303 ) {
304 return true;
305 }
306
307 @Override
308 public final boolean drawImage(
309 Image img,
310 int x,
311 int y,
312 int width,
313 int height,
314 ImageObserver observer
315 ) {
316 return true;
317 }
318
319 @Override
320 public final boolean drawImage(
321 Image img,
322 int x,
323 int y,
324 ImageObserver observer
325 ) {
326 return true;
327 }
328
329 @Override
330 public final void fillPolygon(
331 int [] xPoints,
332 int [] yPoints,
333 int nPoints
334 ) {
335 }
336
337 @Override
338 public final void drawPolygon(
339 int [] xPoints,
340 int [] yPoints,
341 int nPoints
342 ) {
343 }
344
345 @Override
346 public final void drawPolyline(
347 int [] xPoints,
348 int [] yPoints,
349 int nPoints
350 ) {
351 }
352
353 @Override
354 public final void fillArc(
355 int x,
356 int y,
357 int width,
358 int height,
359 int startAngle,
360 int arcAngle
361 ) {
362 }
363
364 @Override
365 public final void drawArc(
366 int x,
367 int y,
368 int width,
369 int height,
370 int startAngle,
371 int arcAngle
372 ) {
373 }
374
375 @Override
376 public final void fillOval(
377 int x,
378 int y,
379 int width,
380 int height
381 ) {
382 }
383
384 @Override
385 public final void drawOval(
386 int x,
387 int y,
388 int width,
389 int height
390 ) {
391 }
392
393 @Override
394 public final void fillRoundRect(
395 int x,
396 int y,
397 int width,
398 int height,
399 int arcWidth,
400 int arcHeight
401 ) {
402 }
403
404 @Override
405 public final void drawRoundRect(
406 int x,
407 int y,
408 int width,
409 int height,
410 int arcWidth,
411 int arcHeight
412 ) {
413 }
414
415 @Override
416 public final void clearRect(
417 int x,
418 int y,
419 int width,
420 int height
421 ) {
422 }
423
424 @Override
425 public final void fillRect(
426 int x,
427 int y,
428 int width,
429 int height
430 ) {
431 }
432
433 @Override
434 public final void drawLine(
435 int x1,
436 int y1,
437 int x2,
438 int y2
439 ) {
440 }
441
442 @Override
443 public final void copyArea(
444 int x,
445 int y,
446 int width,
447 int height,
448 int dx,
449 int dy
450 ) {
451 }
452
453 @Override
454 public final void setClip(
455 int x,
456 int y,
457 int width,
458 int height
459 ) {
460 parent.setClip(x, y, width, height);
461 }
462
463 @Override
464 public final void setClip(Shape shape) {
465 parent.setClip(shape);
466 }
467
468 @Override
469 public final Shape getClip() {
470 return parent.getClip();
471 }
472
473 @Override
474 public final void clipRect(
475 int x,
476 int y,
477 int width,
478 int height
479 ) {
480 parent.clipRect(x, y, width, height);
481 }
482
483 @Override
484 public final Rectangle getClipBounds() {
485 return parent.getClipBounds();
486 }
487
488 @Override
489 public final FontMetrics getFontMetrics(Font f) {
490 return parent.getFontMetrics(f);
491 }
492
493 @Override
494 public final void setFont(Font font) {
495 parent.setFont(font);
496 }
497
498 @Override
499 public final Font getFont() {
500 return parent.getFont();
501 }
502
503 @Override
504 public final void setXORMode(Color c1) {
505 parent.setXORMode(c1);
506 }
507
508 @Override
509 public final void setPaintMode() {
510 parent.setPaintMode();
511 }
512
513 @Override
514 public final void setColor(Color c) {
515 parent.setColor(c);
516 }
517
518 @Override
519 public final Color getColor() {
520 return parent.getColor();
521 }
522
523 @Override
524 public final Graphics create() {
525 return new NOPGraphics2D((Graphics2D)parent.create());
526 }
527 }
528 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org