1 /* ====================================================================
2 Licensed to the Apache Software Foundation (ASF) under one or more
3 contributor license agreements. See the NOTICE file distributed with
4 this work for additional information regarding copyright ownership.
5 The ASF licenses this file to You under the Apache License, Version 2.0
6 (the "License"); you may not use this file except in compliance with
7 the License. You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
16 ==================================================================== */
19 package org
.apache
.poi
.hssf
.usermodel
;
22 import java
.awt
.geom
.AffineTransform
;
23 import java
.awt
.image
.BufferedImage
;
24 import java
.awt
.image
.BufferedImageOp
;
25 import java
.awt
.image
.ImageObserver
;
26 import java
.awt
.image
.RenderedImage
;
27 import java
.awt
.image
.renderable
.RenderableImage
;
28 import java
.awt
.font
.GlyphVector
;
29 import java
.awt
.font
.FontRenderContext
;
31 import java
.text
.AttributedCharacterIterator
;
33 public class DummyGraphics2d
37 private Graphics2D g2D
;
39 public DummyGraphics2d()
41 img
= new BufferedImage(1000, 1000, 2);
42 g2D
= (Graphics2D
)img
.getGraphics();
45 public void addRenderingHints(Map hints
)
47 System
.out
.println( "addRenderingHinds(Map):" );
48 System
.out
.println( " hints = " + hints
);
49 g2D
.addRenderingHints( hints
);
52 public void clip(Shape s
)
54 System
.out
.println( "clip(Shape):" );
55 System
.out
.println( " s = " + s
);
59 public void draw(Shape s
)
61 System
.out
.println( "draw(Shape):" );
62 System
.out
.println( "s = " + s
);
66 public void drawGlyphVector(GlyphVector g
, float x
, float y
)
68 System
.out
.println( "drawGlyphVector(GlyphVector, float, float):" );
69 System
.out
.println( "g = " + g
);
70 System
.out
.println( "x = " + x
);
71 System
.out
.println( "y = " + y
);
72 g2D
.drawGlyphVector( g
, x
, y
);
75 public void drawImage(BufferedImage img
,
80 System
.out
.println( "drawImage(BufferedImage, BufferedImageOp, x, y):" );
81 System
.out
.println( "img = " + img
);
82 System
.out
.println( "op = " + op
);
83 System
.out
.println( "x = " + x
);
84 System
.out
.println( "y = " + y
);
85 g2D
.drawImage( img
, op
, x
, y
);
88 public boolean drawImage(Image img
,
89 AffineTransform xform
,
92 System
.out
.println( "drawImage(Image,AfflineTransform,ImageObserver):" );
93 System
.out
.println( "img = " + img
);
94 System
.out
.println( "xform = " + xform
);
95 System
.out
.println( "obs = " + obs
);
96 return g2D
.drawImage( img
, xform
, obs
);
99 public void drawRenderableImage(RenderableImage img
,
100 AffineTransform xform
)
102 System
.out
.println( "drawRenderableImage(RenderableImage, AfflineTransform):" );
103 System
.out
.println( "img = " + img
);
104 System
.out
.println( "xform = " + xform
);
105 g2D
.drawRenderableImage( img
, xform
);
108 public void drawRenderedImage(RenderedImage img
,
109 AffineTransform xform
)
111 System
.out
.println( "drawRenderedImage(RenderedImage, AffineTransform):" );
112 System
.out
.println( "img = " + img
);
113 System
.out
.println( "xform = " + xform
);
114 g2D
.drawRenderedImage( img
, xform
);
117 public void drawString(AttributedCharacterIterator iterator
,
120 System
.out
.println( "drawString(AttributedCharacterIterator):" );
121 System
.out
.println( "iterator = " + iterator
);
122 System
.out
.println( "x = " + x
);
123 System
.out
.println( "y = " + y
);
124 g2D
.drawString( iterator
, x
, y
);
127 // public void drawString(AttributedCharacterIterator iterator,
130 // g2D.drawString( iterator, x, y );
133 public void drawString(String s
, float x
, float y
)
135 System
.out
.println( "drawString(s,x,y):" );
136 System
.out
.println( "s = " + s
);
137 System
.out
.println( "x = " + x
);
138 System
.out
.println( "y = " + y
);
139 g2D
.drawString( s
, x
, y
);
142 // public void drawString(String str, int x, int y)
144 // g2D.drawString( str, x, y );
147 public void fill(Shape s
)
149 System
.out
.println( "fill(Shape):" );
150 System
.out
.println( "s = " + s
);
154 // public void fill3DRect(int x, int y, int width, int height,
156 // g2D.fill3DRect( x, y, width, height, raised );
159 public Color
getBackground()
161 System
.out
.println( "getBackground():" );
162 return g2D
.getBackground();
165 public Composite
getComposite()
167 System
.out
.println( "getComposite():" );
168 return g2D
.getComposite();
171 public GraphicsConfiguration
getDeviceConfiguration()
173 System
.out
.println( "getDeviceConfiguration():" );
174 return g2D
.getDeviceConfiguration();
177 public FontRenderContext
getFontRenderContext()
179 System
.out
.println( "getFontRenderContext():" );
180 return g2D
.getFontRenderContext();
183 public Paint
getPaint()
185 System
.out
.println( "getPaint():" );
186 return g2D
.getPaint();
189 public Object
getRenderingHint(RenderingHints
.Key hintKey
)
191 System
.out
.println( "getRenderingHint(RenderingHints.Key):" );
192 System
.out
.println( "hintKey = " + hintKey
);
193 return g2D
.getRenderingHint( hintKey
);
196 public RenderingHints
getRenderingHints()
198 System
.out
.println( "getRenderingHints():" );
199 return g2D
.getRenderingHints();
202 public Stroke
getStroke()
204 System
.out
.println( "getStroke():" );
205 return g2D
.getStroke();
208 public AffineTransform
getTransform()
210 System
.out
.println( "getTransform():" );
211 return g2D
.getTransform();
214 public boolean hit(Rectangle rect
,
218 System
.out
.println( "hit(Rectangle, Shape, onStroke):" );
219 System
.out
.println( "rect = " + rect
);
220 System
.out
.println( "s = " + s
);
221 System
.out
.println( "onStroke = " + onStroke
);
222 return g2D
.hit( rect
, s
, onStroke
);
225 public void rotate(double theta
)
227 System
.out
.println( "rotate(theta):" );
228 System
.out
.println( "theta = " + theta
);
232 public void rotate(double theta
, double x
, double y
)
234 System
.out
.println( "rotate(double,double,double):" );
235 System
.out
.println( "theta = " + theta
);
236 System
.out
.println( "x = " + x
);
237 System
.out
.println( "y = " + y
);
238 g2D
.rotate( theta
, x
, y
);
241 public void scale(double sx
, double sy
)
243 System
.out
.println( "scale(double,double):" );
244 System
.out
.println( "sx = " + sx
);
245 System
.out
.println( "sy" );
249 public void setBackground(Color color
)
251 System
.out
.println( "setBackground(Color):" );
252 System
.out
.println( "color = " + color
);
253 g2D
.setBackground( color
);
256 public void setComposite(Composite comp
)
258 System
.out
.println( "setComposite(Composite):" );
259 System
.out
.println( "comp = " + comp
);
260 g2D
.setComposite( comp
);
263 public void setPaint( Paint paint
)
265 System
.out
.println( "setPain(Paint):" );
266 System
.out
.println( "paint = " + paint
);
267 g2D
.setPaint( paint
);
270 public void setRenderingHint(RenderingHints
.Key hintKey
, Object hintValue
)
272 System
.out
.println( "setRenderingHint(RenderingHints.Key, Object):" );
273 System
.out
.println( "hintKey = " + hintKey
);
274 System
.out
.println( "hintValue = " + hintValue
);
275 g2D
.setRenderingHint( hintKey
, hintValue
);
278 public void setRenderingHints(Map hints
)
280 System
.out
.println( "setRenderingHints(Map):" );
281 System
.out
.println( "hints = " + hints
);
282 g2D
.setRenderingHints( hints
);
285 public void setStroke(Stroke s
)
287 System
.out
.println( "setStroke(Stoke):" );
288 System
.out
.println( "s = " + s
);
292 public void setTransform(AffineTransform Tx
)
294 System
.out
.println( "setTransform():" );
295 System
.out
.println( "Tx = " + Tx
);
296 g2D
.setTransform( Tx
);
299 public void shear(double shx
, double shy
)
301 System
.out
.println( "shear(shx, dhy):" );
302 System
.out
.println( "shx = " + shx
);
303 System
.out
.println( "shy = " + shy
);
304 g2D
.shear( shx
, shy
);
307 public void transform(AffineTransform Tx
)
309 System
.out
.println( "transform(AffineTransform):" );
310 System
.out
.println( "Tx = " + Tx
);
314 public void translate(double tx
, double ty
)
316 System
.out
.println( "translate(double, double):" );
317 System
.out
.println( "tx = " + tx
);
318 System
.out
.println( "ty = " + ty
);
319 g2D
.translate( tx
, ty
);
322 // public void translate(int x, int y)
324 // g2D.translate( x, y );
327 public void clearRect(int x
, int y
, int width
, int height
)
329 System
.out
.println( "clearRect(int,int,int,int):" );
330 System
.out
.println( "x = " + x
);
331 System
.out
.println( "y = " + y
);
332 System
.out
.println( "width = " + width
);
333 System
.out
.println( "height = " + height
);
334 g2D
.clearRect( x
, y
, width
, height
);
337 public void clipRect(int x
, int y
, int width
, int height
)
339 System
.out
.println( "clipRect(int, int, int, int):" );
340 System
.out
.println( "x = " + x
);
341 System
.out
.println( "y = " + y
);
342 System
.out
.println( "width = " + width
);
343 System
.out
.println( "height = " + height
);
344 g2D
.clipRect( x
, y
, width
, height
);
347 public void copyArea(int x
, int y
, int width
, int height
,
350 System
.out
.println( "copyArea(int,int,int,int):" );
351 System
.out
.println( "x = " + x
);
352 System
.out
.println( "y = " + y
);
353 System
.out
.println( "width = " + width
);
354 System
.out
.println( "height = " + height
);
355 g2D
.copyArea( x
, y
, width
, height
, dx
, dy
);
358 public Graphics
create()
360 System
.out
.println( "create():" );
364 public Graphics
create(int x
, int y
, int width
, int height
) {
365 System
.out
.println( "create(int,int,int,int):" );
366 System
.out
.println( "x = " + x
);
367 System
.out
.println( "y = " + y
);
368 System
.out
.println( "width = " + width
);
369 System
.out
.println( "height = " + height
);
370 return g2D
.create( x
, y
, width
, height
);
373 public void dispose()
375 System
.out
.println( "dispose():" );
379 public void draw3DRect(int x
, int y
, int width
, int height
,
381 System
.out
.println( "draw3DRect(int,int,int,int,boolean):" );
382 System
.out
.println( "x = " + x
);
383 System
.out
.println( "y = " + y
);
384 System
.out
.println( "width = " + width
);
385 System
.out
.println( "height = " + height
);
386 System
.out
.println( "raised = " + raised
);
387 g2D
.draw3DRect( x
, y
, width
, height
, raised
);
390 public void drawArc(int x
, int y
, int width
, int height
,
391 int startAngle
, int arcAngle
)
393 System
.out
.println( "drawArc(int,int,int,int,int,int):" );
394 System
.out
.println( "x = " + x
);
395 System
.out
.println( "y = " + y
);
396 System
.out
.println( "width = " + width
);
397 System
.out
.println( "height = " + height
);
398 System
.out
.println( "startAngle = " + startAngle
);
399 System
.out
.println( "arcAngle = " + arcAngle
);
400 g2D
.drawArc( x
, y
, width
, height
, startAngle
, arcAngle
);
403 public void drawBytes(byte data
[], int offset
, int length
, int x
, int y
) {
404 System
.out
.println( "drawBytes(byte[],int,int,int,int):" );
405 System
.out
.println( "data = " + data
);
406 System
.out
.println( "offset = " + offset
);
407 System
.out
.println( "length = " + length
);
408 System
.out
.println( "x = " + x
);
409 System
.out
.println( "y = " + y
);
410 g2D
.drawBytes( data
, offset
, length
, x
, y
);
413 public void drawChars(char data
[], int offset
, int length
, int x
, int y
) {
414 System
.out
.println( "drawChars(data,int,int,int,int):" );
415 System
.out
.println( "data = " + data
.toString() );
416 System
.out
.println( "offset = " + offset
);
417 System
.out
.println( "length = " + length
);
418 System
.out
.println( "x = " + x
);
419 System
.out
.println( "y = " + y
);
420 g2D
.drawChars( data
, offset
, length
, x
, y
);
423 public boolean drawImage(Image img
,
424 int dx1
, int dy1
, int dx2
, int dy2
,
425 int sx1
, int sy1
, int sx2
, int sy2
,
426 ImageObserver observer
)
428 System
.out
.println( "drawImage(Image,int,int,int,int,int,int,int,int,ImageObserver):" );
429 System
.out
.println( "img = " + img
);
430 System
.out
.println( "dx1 = " + dx1
);
431 System
.out
.println( "dy1 = " + dy1
);
432 System
.out
.println( "dx2 = " + dx2
);
433 System
.out
.println( "dy2 = " + dy2
);
434 System
.out
.println( "sx1 = " + sx1
);
435 System
.out
.println( "sy1 = " + sy1
);
436 System
.out
.println( "sx2 = " + sx2
);
437 System
.out
.println( "sy2 = " + sy2
);
438 System
.out
.println( "observer = " + observer
);
439 return g2D
.drawImage( img
, dx1
, dy1
, dx2
, dy2
, sx1
, sy1
, sx2
, sy2
, observer
);
442 public boolean drawImage(Image img
,
443 int dx1
, int dy1
, int dx2
, int dy2
,
444 int sx1
, int sy1
, int sx2
, int sy2
,
446 ImageObserver observer
)
448 System
.out
.println( "drawImage(Image,int,int,int,int,int,int,int,int,Color,ImageObserver):" );
449 System
.out
.println( "img = " + img
);
450 System
.out
.println( "dx1 = " + dx1
);
451 System
.out
.println( "dy1 = " + dy1
);
452 System
.out
.println( "dx2 = " + dx2
);
453 System
.out
.println( "dy2 = " + dy2
);
454 System
.out
.println( "sx1 = " + sx1
);
455 System
.out
.println( "sy1 = " + sy1
);
456 System
.out
.println( "sx2 = " + sx2
);
457 System
.out
.println( "sy2 = " + sy2
);
458 System
.out
.println( "bgcolor = " + bgcolor
);
459 System
.out
.println( "observer = " + observer
);
460 return g2D
.drawImage( img
, dx1
, dy1
, dx2
, dy2
, sx1
, sy1
, sx2
, sy2
, bgcolor
, observer
);
463 public boolean drawImage(Image img
, int x
, int y
,
465 ImageObserver observer
)
467 System
.out
.println( "drawImage(Image,int,int,Color,ImageObserver):" );
468 System
.out
.println( "img = " + img
);
469 System
.out
.println( "x = " + x
);
470 System
.out
.println( "y = " + y
);
471 System
.out
.println( "bgcolor = " + bgcolor
);
472 System
.out
.println( "observer = " + observer
);
473 return g2D
.drawImage( img
, x
, y
, bgcolor
, observer
);
476 public boolean drawImage(Image img
, int x
, int y
,
477 ImageObserver observer
)
479 System
.out
.println( "drawImage(Image,int,int,observer):" );
480 System
.out
.println( "img = " + img
);
481 System
.out
.println( "x = " + x
);
482 System
.out
.println( "y = " + y
);
483 System
.out
.println( "observer = " + observer
);
484 return g2D
.drawImage( img
, x
, y
, observer
);
487 public boolean drawImage(Image img
, int x
, int y
,
488 int width
, int height
,
490 ImageObserver observer
)
492 System
.out
.println( "drawImage(Image,int,int,int,int,Color,ImageObserver):" );
493 System
.out
.println( "img = " + img
);
494 System
.out
.println( "x = " + x
);
495 System
.out
.println( "y = " + y
);
496 System
.out
.println( "width = " + width
);
497 System
.out
.println( "height = " + height
);
498 System
.out
.println( "bgcolor = " + bgcolor
);
499 System
.out
.println( "observer = " + observer
);
500 return g2D
.drawImage( img
, x
, y
, width
, height
, bgcolor
, observer
);
503 public boolean drawImage(Image img
, int x
, int y
,
504 int width
, int height
,
505 ImageObserver observer
)
507 System
.out
.println( "drawImage(Image,int,int,width,height,observer):" );
508 System
.out
.println( "img = " + img
);
509 System
.out
.println( "x = " + x
);
510 System
.out
.println( "y = " + y
);
511 System
.out
.println( "width = " + width
);
512 System
.out
.println( "height = " + height
);
513 System
.out
.println( "observer = " + observer
);
514 return g2D
.drawImage( img
, x
, y
, width
, height
, observer
);
517 public void drawLine(int x1
, int y1
, int x2
, int y2
)
519 System
.out
.println( "drawLine(int,int,int,int):" );
520 System
.out
.println( "x1 = " + x1
);
521 System
.out
.println( "y1 = " + y1
);
522 System
.out
.println( "x2 = " + x2
);
523 System
.out
.println( "y2 = " + y2
);
524 g2D
.drawLine( x1
, y1
, x2
, y2
);
527 public void drawOval(int x
, int y
, int width
, int height
)
529 System
.out
.println( "drawOval(int,int,int,int):" );
530 System
.out
.println( "x = " + x
);
531 System
.out
.println( "y = " + y
);
532 System
.out
.println( "width = " + width
);
533 System
.out
.println( "height = " + height
);
534 g2D
.drawOval( x
, y
, width
, height
);
537 public void drawPolygon(Polygon p
) {
538 System
.out
.println( "drawPolygon(Polygon):" );
539 System
.out
.println( "p = " + p
);
540 g2D
.drawPolygon( p
);
543 public void drawPolygon(int xPoints
[], int yPoints
[],
546 System
.out
.println( "drawPolygon(int[],int[],int):" );
547 System
.out
.println( "xPoints = " + xPoints
);
548 System
.out
.println( "yPoints = " + yPoints
);
549 System
.out
.println( "nPoints = " + nPoints
);
550 g2D
.drawPolygon( xPoints
, yPoints
, nPoints
);
553 public void drawPolyline(int xPoints
[], int yPoints
[],
556 System
.out
.println( "drawPolyline(int[],int[],int):" );
557 System
.out
.println( "xPoints = " + xPoints
);
558 System
.out
.println( "yPoints = " + yPoints
);
559 System
.out
.println( "nPoints = " + nPoints
);
560 g2D
.drawPolyline( xPoints
, yPoints
, nPoints
);
563 public void drawRect(int x
, int y
, int width
, int height
) {
564 System
.out
.println( "drawRect(int,int,int,int):" );
565 System
.out
.println( "x = " + x
);
566 System
.out
.println( "y = " + y
);
567 System
.out
.println( "width = " + width
);
568 System
.out
.println( "height = " + height
);
569 g2D
.drawRect( x
, y
, width
, height
);
572 public void drawRoundRect(int x
, int y
, int width
, int height
,
573 int arcWidth
, int arcHeight
)
575 System
.out
.println( "drawRoundRect(int,int,int,int,int,int):" );
576 System
.out
.println( "x = " + x
);
577 System
.out
.println( "y = " + y
);
578 System
.out
.println( "width = " + width
);
579 System
.out
.println( "height = " + height
);
580 System
.out
.println( "arcWidth = " + arcWidth
);
581 System
.out
.println( "arcHeight = " + arcHeight
);
582 g2D
.drawRoundRect( x
, y
, width
, height
, arcWidth
, arcHeight
);
585 public void drawString(AttributedCharacterIterator iterator
,
588 System
.out
.println( "drawString(AttributedCharacterIterator,int,int):" );
589 System
.out
.println( "iterator = " + iterator
);
590 System
.out
.println( "x = " + x
);
591 System
.out
.println( "y = " + y
);
592 g2D
.drawString( iterator
, x
, y
);
595 public void drawString(String str
, int x
, int y
)
597 System
.out
.println( "drawString(str,int,int):" );
598 System
.out
.println( "str = " + str
);
599 System
.out
.println( "x = " + x
);
600 System
.out
.println( "y = " + y
);
601 g2D
.drawString( str
, x
, y
);
604 public void fill3DRect(int x
, int y
, int width
, int height
,
606 System
.out
.println( "fill3DRect(int,int,int,int,boolean):" );
607 System
.out
.println( "x = " + x
);
608 System
.out
.println( "y = " + y
);
609 System
.out
.println( "width = " + width
);
610 System
.out
.println( "height = " + height
);
611 System
.out
.println( "raised = " + raised
);
612 g2D
.fill3DRect( x
, y
, width
, height
, raised
);
615 public void fillArc(int x
, int y
, int width
, int height
,
616 int startAngle
, int arcAngle
)
618 System
.out
.println( "fillArc(int,int,int,int,int,int):" );
619 System
.out
.println( "x = " + x
);
620 System
.out
.println( "y = " + y
);
621 System
.out
.println( "width = " + width
);
622 System
.out
.println( "height = " + height
);
623 System
.out
.println( "startAngle = " + startAngle
);
624 System
.out
.println( "arcAngle = " + arcAngle
);
625 g2D
.fillArc( x
, y
, width
, height
, startAngle
, arcAngle
);
628 public void fillOval(int x
, int y
, int width
, int height
)
630 System
.out
.println( "fillOval(int,int,int,int):" );
631 System
.out
.println( "x = " + x
);
632 System
.out
.println( "y = " + y
);
633 System
.out
.println( "width = " + width
);
634 System
.out
.println( "height = " + height
);
635 g2D
.fillOval( x
, y
, width
, height
);
638 public void fillPolygon(Polygon p
) {
639 System
.out
.println( "fillPolygon(Polygon):" );
640 System
.out
.println( "p = " + p
);
641 g2D
.fillPolygon( p
);
644 public void fillPolygon(int xPoints
[], int yPoints
[],
647 System
.out
.println( "fillPolygon(int[],int[],int):" );
648 System
.out
.println( "xPoints = " + xPoints
);
649 System
.out
.println( "yPoints = " + yPoints
);
650 System
.out
.println( "nPoints = " + nPoints
);
651 g2D
.fillPolygon( xPoints
, yPoints
, nPoints
);
654 public void fillRect(int x
, int y
, int width
, int height
)
656 System
.out
.println( "fillRect(int,int,int,int):" );
657 System
.out
.println( "x = " + x
);
658 System
.out
.println( "y = " + y
);
659 System
.out
.println( "width = " + width
);
660 System
.out
.println( "height = " + height
);
661 g2D
.fillRect( x
, y
, width
, height
);
664 public void fillRoundRect(int x
, int y
, int width
, int height
,
665 int arcWidth
, int arcHeight
)
667 System
.out
.println( "fillRoundRect(int,int,int,int,int,int):" );
668 System
.out
.println( "x = " + x
);
669 System
.out
.println( "y = " + y
);
670 System
.out
.println( "width = " + width
);
671 System
.out
.println( "height = " + height
);
672 g2D
.fillRoundRect( x
, y
, width
, height
, arcWidth
, arcHeight
);
675 public void finalize() {
676 System
.out
.println( "finalize():" );
680 public Shape
getClip()
682 System
.out
.println( "getClip():" );
683 return g2D
.getClip();
686 public Rectangle
getClipBounds()
688 System
.out
.println( "getClipBounds():" );
689 return g2D
.getClipBounds();
692 public Rectangle
getClipBounds(Rectangle r
) {
693 System
.out
.println( "getClipBounds(Rectangle):" );
694 System
.out
.println( "r = " + r
);
695 return g2D
.getClipBounds( r
);
698 public Rectangle
getClipRect() {
699 System
.out
.println( "getClipRect():" );
700 return g2D
.getClipRect();
703 public Color
getColor()
705 System
.out
.println( "getColor():" );
706 return g2D
.getColor();
709 public Font
getFont()
711 System
.out
.println( "getFont():" );
712 return g2D
.getFont();
715 public FontMetrics
getFontMetrics() {
716 System
.out
.println( "getFontMetrics():" );
717 return g2D
.getFontMetrics();
720 public FontMetrics
getFontMetrics(Font f
)
722 System
.out
.println( "getFontMetrics():" );
723 return g2D
.getFontMetrics( f
);
726 public boolean hitClip(int x
, int y
, int width
, int height
) {
727 System
.out
.println( "hitClip(int,int,int,int):" );
728 System
.out
.println( "x = " + x
);
729 System
.out
.println( "y = " + y
);
730 System
.out
.println( "width = " + width
);
731 System
.out
.println( "height = " + height
);
732 return g2D
.hitClip( x
, y
, width
, height
);
735 public void setClip(Shape clip
)
737 System
.out
.println( "setClip(Shape):" );
738 System
.out
.println( "clip = " + clip
);
742 public void setClip(int x
, int y
, int width
, int height
)
744 System
.out
.println( "setClip(int,int,int,int):" );
745 System
.out
.println( "x = " + x
);
746 System
.out
.println( "y = " + y
);
747 System
.out
.println( "width = " + width
);
748 System
.out
.println( "height = " + height
);
749 g2D
.setClip( x
, y
, width
, height
);
752 public void setColor(Color c
)
754 System
.out
.println( "setColor():" );
755 System
.out
.println( "c = " + c
);
759 public void setFont(Font font
)
761 System
.out
.println( "setFont(Font):" );
762 System
.out
.println( "font = " + font
);
766 public void setPaintMode()
768 System
.out
.println( "setPaintMode():" );
772 public void setXORMode(Color c1
)
774 System
.out
.println( "setXORMode(Color):" );
775 System
.out
.println( "c1 = " + c1
);
776 g2D
.setXORMode( c1
);
779 public String
toString() {
780 System
.out
.println( "toString():" );
781 return g2D
.toString();
784 public void translate(int x
, int y
)
786 System
.out
.println( "translate(int,int):" );
787 System
.out
.println( "x = " + x
);
788 System
.out
.println( "y = " + y
);
789 g2D
.translate( x
, y
);