net.sf.jaxodraw.util.graphics
Class JaxoWrapperGraphics2D

java.lang.Object
  extended by java.awt.Graphics
      extended by java.awt.Graphics2D
          extended by net.sf.jaxodraw.util.graphics.JaxoWrapperGraphics2D
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
JaxoGraphics2D

public class JaxoWrapperGraphics2D
extends java.awt.Graphics2D
implements java.lang.Cloneable

Wrapper around an existing Graphics2D. All methods except two create() are delegated.

Since:
2.0

Constructor Summary
protected JaxoWrapperGraphics2D(java.awt.Graphics2D g)
          Constructor.
 
Method Summary
 void addRenderingHints(java.util.Map a)
          
 void clearRect(int a, int b, int c, int d)
          
 void clip(java.awt.Shape a)
          
 void clipRect(int a, int b, int c, int d)
          
protected  JaxoWrapperGraphics2D clone(java.awt.Graphics2D g)
          A clone which wraps the given Graphics2D.
protected  java.lang.Object copy()
          A clone which wraps the same Graphics2D as this.
 void copyArea(int a, int b, int c, int d, int e, int f)
          
 java.awt.Graphics create()
          A JaxoWrapperGraphics2D wrapping a Graphics2D obtained from the wrapped Graphics' create().
 java.awt.Graphics create(int x, int y, int w, int h)
          A JaxoWrapperGraphics2D wrapping a Graphics2D obtained from the wrapped Graphics' create(...).
 void dispose()
          
 void draw(java.awt.Shape a)
          
 void draw3DRect(int a, int b, int c, int d, boolean e)
          
 void drawArc(int a, int b, int c, int d, int e, int f)
          
 void drawBytes(byte[] a, int b, int c, int d, int e)
          
 void drawChars(char[] a, int b, int c, int d, int e)
          
 void drawGlyphVector(java.awt.font.GlyphVector a, float b, float c)
          
 void drawImage(java.awt.image.BufferedImage a, java.awt.image.BufferedImageOp b, int c, int d)
          
 boolean drawImage(java.awt.Image a, java.awt.geom.AffineTransform b, java.awt.image.ImageObserver c)
          
 boolean drawImage(java.awt.Image a, int b, int c, java.awt.Color d, java.awt.image.ImageObserver e)
          
 boolean drawImage(java.awt.Image a, int b, int c, java.awt.image.ImageObserver d)
          
 boolean drawImage(java.awt.Image a, int b, int c, int d, int e, java.awt.Color f, java.awt.image.ImageObserver g)
          
 boolean drawImage(java.awt.Image a, int b, int c, int d, int e, java.awt.image.ImageObserver f)
          
 boolean drawImage(java.awt.Image a, int b, int c, int d, int e, int f, int g, int h, int i, java.awt.Color j, java.awt.image.ImageObserver k)
          
 boolean drawImage(java.awt.Image a, int b, int c, int d, int e, int f, int g, int h, int i, java.awt.image.ImageObserver j)
          
 void drawLine(int a, int b, int c, int d)
          
 void drawOval(int a, int b, int c, int d)
          
 void drawPolygon(int[] a, int[] b, int c)
          
 void drawPolygon(java.awt.Polygon a)
          
 void drawPolyline(int[] a, int[] b, int c)
          
 void drawRect(int a, int b, int c, int d)
          
 void drawRenderableImage(java.awt.image.renderable.RenderableImage a, java.awt.geom.AffineTransform b)
          
 void drawRenderedImage(java.awt.image.RenderedImage a, java.awt.geom.AffineTransform b)
          
 void drawRoundRect(int a, int b, int c, int d, int e, int f)
          
 void drawString(java.text.AttributedCharacterIterator a, float b, float c)
          
 void drawString(java.text.AttributedCharacterIterator a, int b, int c)
          
 void drawString(java.lang.String a, float b, float c)
          
 void drawString(java.lang.String a, int b, int c)
          
 void fill(java.awt.Shape a)
          
 void fill3DRect(int a, int b, int c, int d, boolean e)
          
 void fillArc(int a, int b, int c, int d, int e, int f)
          
 void fillOval(int a, int b, int c, int d)
          
 void fillPolygon(int[] a, int[] b, int c)
          
 void fillPolygon(java.awt.Polygon a)
          
 void fillRect(int a, int b, int c, int d)
          
 void fillRoundRect(int a, int b, int c, int d, int e, int f)
          
 java.awt.Color getBackground()
          
 java.awt.Shape getClip()
          
 java.awt.Rectangle getClipBounds()
          
 java.awt.Rectangle getClipBounds(java.awt.Rectangle a)
          
 java.awt.Color getColor()
          
 java.awt.Composite getComposite()
          
 java.awt.GraphicsConfiguration getDeviceConfiguration()
          
 java.awt.Font getFont()
          
 java.awt.FontMetrics getFontMetrics()
          
 java.awt.FontMetrics getFontMetrics(java.awt.Font a)
          
 java.awt.font.FontRenderContext getFontRenderContext()
          
 java.awt.Paint getPaint()
          
 java.lang.Object getRenderingHint(java.awt.RenderingHints.Key a)
          
 java.awt.RenderingHints getRenderingHints()
          
 java.awt.Stroke getStroke()
          
 java.awt.geom.AffineTransform getTransform()
          
 boolean hit(java.awt.Rectangle a, java.awt.Shape b, boolean c)
          
 boolean hitClip(int a, int b, int c, int d)
          
 void rotate(double a)
          
 void rotate(double a, double b, double c)
          
 void scale(double a, double b)
          
 void setBackground(java.awt.Color a)
          
 void setClip(int a, int b, int c, int d)
          
 void setClip(java.awt.Shape a)
          
 void setColor(java.awt.Color a)
          
 void setComposite(java.awt.Composite a)
          
 void setFont(java.awt.Font a)
          
 void setPaint(java.awt.Paint a)
          
 void setPaintMode()
          
 void setRenderingHint(java.awt.RenderingHints.Key a, java.lang.Object b)
          
 void setRenderingHints(java.util.Map a)
          
 void setStroke(java.awt.Stroke a)
          
 void setTransform(java.awt.geom.AffineTransform a)
          
 void setXORMode(java.awt.Color a)
          
 void shear(double a, double b)
          
 void transform(java.awt.geom.AffineTransform a)
          
 void translate(double a, double b)
          
 void translate(int a, int b)
          
 
Methods inherited from class java.awt.Graphics
finalize, getClipRect, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JaxoWrapperGraphics2D

protected JaxoWrapperGraphics2D(java.awt.Graphics2D g)
Constructor.

Parameters:
g - The initial graphics object.
Method Detail

copy

protected java.lang.Object copy()
A clone which wraps the same Graphics2D as this.

Returns:
A clone of the Graphics2D.

clone

protected JaxoWrapperGraphics2D clone(java.awt.Graphics2D g)
A clone which wraps the given Graphics2D.

Parameters:
g - The graphics object to clone.
Returns:
A clone of the Graphics2D.

create

public java.awt.Graphics create()
A JaxoWrapperGraphics2D wrapping a Graphics2D obtained from the wrapped Graphics' create().

Specified by:
create in class java.awt.Graphics
Returns:
A new graphics object.

create

public java.awt.Graphics create(int x,
                                int y,
                                int w,
                                int h)
A JaxoWrapperGraphics2D wrapping a Graphics2D obtained from the wrapped Graphics' create(...).

Overrides:
create in class java.awt.Graphics
Parameters:
x - The x coordinate.
y - The y coordinate.
w - The width.
h - The height.
Returns:
A new graphics object.

dispose

public void dispose()

Specified by:
dispose in class java.awt.Graphics

setPaintMode

public void setPaintMode()

Specified by:
setPaintMode in class java.awt.Graphics

translate

public void translate(int a,
                      int b)

Specified by:
translate in class java.awt.Graphics2D

clearRect

public void clearRect(int a,
                      int b,
                      int c,
                      int d)

Specified by:
clearRect in class java.awt.Graphics

clipRect

public void clipRect(int a,
                     int b,
                     int c,
                     int d)

Specified by:
clipRect in class java.awt.Graphics

drawLine

public void drawLine(int a,
                     int b,
                     int c,
                     int d)

Specified by:
drawLine in class java.awt.Graphics

drawOval

public void drawOval(int a,
                     int b,
                     int c,
                     int d)

Specified by:
drawOval in class java.awt.Graphics

drawRect

public void drawRect(int a,
                     int b,
                     int c,
                     int d)

Overrides:
drawRect in class java.awt.Graphics

fillOval

public void fillOval(int a,
                     int b,
                     int c,
                     int d)

Specified by:
fillOval in class java.awt.Graphics

fillRect

public void fillRect(int a,
                     int b,
                     int c,
                     int d)

Specified by:
fillRect in class java.awt.Graphics

setClip

public void setClip(int a,
                    int b,
                    int c,
                    int d)

Specified by:
setClip in class java.awt.Graphics

hitClip

public boolean hitClip(int a,
                       int b,
                       int c,
                       int d)

Overrides:
hitClip in class java.awt.Graphics

copyArea

public void copyArea(int a,
                     int b,
                     int c,
                     int d,
                     int e,
                     int f)

Specified by:
copyArea in class java.awt.Graphics

drawArc

public void drawArc(int a,
                    int b,
                    int c,
                    int d,
                    int e,
                    int f)

Specified by:
drawArc in class java.awt.Graphics

drawRoundRect

public void drawRoundRect(int a,
                          int b,
                          int c,
                          int d,
                          int e,
                          int f)

Specified by:
drawRoundRect in class java.awt.Graphics

fillArc

public void fillArc(int a,
                    int b,
                    int c,
                    int d,
                    int e,
                    int f)

Specified by:
fillArc in class java.awt.Graphics

fillRoundRect

public void fillRoundRect(int a,
                          int b,
                          int c,
                          int d,
                          int e,
                          int f)

Specified by:
fillRoundRect in class java.awt.Graphics

draw3DRect

public void draw3DRect(int a,
                       int b,
                       int c,
                       int d,
                       boolean e)

Overrides:
draw3DRect in class java.awt.Graphics2D

fill3DRect

public void fill3DRect(int a,
                       int b,
                       int c,
                       int d,
                       boolean e)

Overrides:
fill3DRect in class java.awt.Graphics2D

drawBytes

public void drawBytes(byte[] a,
                      int b,
                      int c,
                      int d,
                      int e)

Overrides:
drawBytes in class java.awt.Graphics

drawChars

public void drawChars(char[] a,
                      int b,
                      int c,
                      int d,
                      int e)

Overrides:
drawChars in class java.awt.Graphics

drawPolygon

public void drawPolygon(int[] a,
                        int[] b,
                        int c)

Specified by:
drawPolygon in class java.awt.Graphics

drawPolyline

public void drawPolyline(int[] a,
                         int[] b,
                         int c)

Specified by:
drawPolyline in class java.awt.Graphics

fillPolygon

public void fillPolygon(int[] a,
                        int[] b,
                        int c)

Specified by:
fillPolygon in class java.awt.Graphics

getColor

public java.awt.Color getColor()

Specified by:
getColor in class java.awt.Graphics

setColor

public void setColor(java.awt.Color a)

Specified by:
setColor in class java.awt.Graphics

setXORMode

public void setXORMode(java.awt.Color a)

Specified by:
setXORMode in class java.awt.Graphics

getFont

public java.awt.Font getFont()

Specified by:
getFont in class java.awt.Graphics

setFont

public void setFont(java.awt.Font a)

Specified by:
setFont in class java.awt.Graphics

getFontMetrics

public java.awt.FontMetrics getFontMetrics()

Overrides:
getFontMetrics in class java.awt.Graphics

drawPolygon

public void drawPolygon(java.awt.Polygon a)

Overrides:
drawPolygon in class java.awt.Graphics

fillPolygon

public void fillPolygon(java.awt.Polygon a)

Overrides:
fillPolygon in class java.awt.Graphics

getClipBounds

public java.awt.Rectangle getClipBounds()

Specified by:
getClipBounds in class java.awt.Graphics

getClip

public java.awt.Shape getClip()

Specified by:
getClip in class java.awt.Graphics

setClip

public void setClip(java.awt.Shape a)

Specified by:
setClip in class java.awt.Graphics

getFontMetrics

public java.awt.FontMetrics getFontMetrics(java.awt.Font a)

Specified by:
getFontMetrics in class java.awt.Graphics

getClipBounds

public java.awt.Rectangle getClipBounds(java.awt.Rectangle a)

Overrides:
getClipBounds in class java.awt.Graphics

drawImage

public boolean drawImage(java.awt.Image a,
                         int b,
                         int c,
                         int d,
                         int e,
                         int f,
                         int g,
                         int h,
                         int i,
                         java.awt.image.ImageObserver j)

Specified by:
drawImage in class java.awt.Graphics

drawImage

public boolean drawImage(java.awt.Image a,
                         int b,
                         int c,
                         int d,
                         int e,
                         java.awt.image.ImageObserver f)

Specified by:
drawImage in class java.awt.Graphics

drawImage

public boolean drawImage(java.awt.Image a,
                         int b,
                         int c,
                         java.awt.image.ImageObserver d)

Specified by:
drawImage in class java.awt.Graphics

drawImage

public boolean drawImage(java.awt.Image a,
                         int b,
                         int c,
                         int d,
                         int e,
                         int f,
                         int g,
                         int h,
                         int i,
                         java.awt.Color j,
                         java.awt.image.ImageObserver k)

Specified by:
drawImage in class java.awt.Graphics

drawImage

public boolean drawImage(java.awt.Image a,
                         int b,
                         int c,
                         int d,
                         int e,
                         java.awt.Color f,
                         java.awt.image.ImageObserver g)

Specified by:
drawImage in class java.awt.Graphics

drawImage

public boolean drawImage(java.awt.Image a,
                         int b,
                         int c,
                         java.awt.Color d,
                         java.awt.image.ImageObserver e)

Specified by:
drawImage in class java.awt.Graphics

rotate

public void rotate(double a)

Specified by:
rotate in class java.awt.Graphics2D

scale

public void scale(double a,
                  double b)

Specified by:
scale in class java.awt.Graphics2D

shear

public void shear(double a,
                  double b)

Specified by:
shear in class java.awt.Graphics2D

translate

public void translate(double a,
                      double b)

Specified by:
translate in class java.awt.Graphics2D

rotate

public void rotate(double a,
                   double b,
                   double c)

Specified by:
rotate in class java.awt.Graphics2D

getBackground

public java.awt.Color getBackground()

Specified by:
getBackground in class java.awt.Graphics2D

setBackground

public void setBackground(java.awt.Color a)

Specified by:
setBackground in class java.awt.Graphics2D

getComposite

public java.awt.Composite getComposite()

Specified by:
getComposite in class java.awt.Graphics2D

setComposite

public void setComposite(java.awt.Composite a)

Specified by:
setComposite in class java.awt.Graphics2D

getDeviceConfiguration

public java.awt.GraphicsConfiguration getDeviceConfiguration()

Specified by:
getDeviceConfiguration in class java.awt.Graphics2D

getPaint

public java.awt.Paint getPaint()

Specified by:
getPaint in class java.awt.Graphics2D

setPaint

public void setPaint(java.awt.Paint a)

Specified by:
setPaint in class java.awt.Graphics2D

getRenderingHints

public java.awt.RenderingHints getRenderingHints()

Specified by:
getRenderingHints in class java.awt.Graphics2D

clip

public void clip(java.awt.Shape a)

Specified by:
clip in class java.awt.Graphics2D

draw

public void draw(java.awt.Shape a)

Specified by:
draw in class java.awt.Graphics2D

fill

public void fill(java.awt.Shape a)

Specified by:
fill in class java.awt.Graphics2D

getStroke

public java.awt.Stroke getStroke()

Specified by:
getStroke in class java.awt.Graphics2D

setStroke

public void setStroke(java.awt.Stroke a)

Specified by:
setStroke in class java.awt.Graphics2D

getFontRenderContext

public java.awt.font.FontRenderContext getFontRenderContext()

Specified by:
getFontRenderContext in class java.awt.Graphics2D

drawGlyphVector

public void drawGlyphVector(java.awt.font.GlyphVector a,
                            float b,
                            float c)

Specified by:
drawGlyphVector in class java.awt.Graphics2D

getTransform

public java.awt.geom.AffineTransform getTransform()

Specified by:
getTransform in class java.awt.Graphics2D

setTransform

public void setTransform(java.awt.geom.AffineTransform a)

Specified by:
setTransform in class java.awt.Graphics2D

transform

public void transform(java.awt.geom.AffineTransform a)

Specified by:
transform in class java.awt.Graphics2D

drawString

public void drawString(java.lang.String a,
                       float b,
                       float c)

Specified by:
drawString in class java.awt.Graphics2D

drawString

public void drawString(java.lang.String a,
                       int b,
                       int c)

Specified by:
drawString in class java.awt.Graphics2D

drawString

public void drawString(java.text.AttributedCharacterIterator a,
                       float b,
                       float c)

Specified by:
drawString in class java.awt.Graphics2D

drawString

public void drawString(java.text.AttributedCharacterIterator a,
                       int b,
                       int c)

Specified by:
drawString in class java.awt.Graphics2D

addRenderingHints

public void addRenderingHints(java.util.Map a)

Specified by:
addRenderingHints in class java.awt.Graphics2D

setRenderingHints

public void setRenderingHints(java.util.Map a)

Specified by:
setRenderingHints in class java.awt.Graphics2D

hit

public boolean hit(java.awt.Rectangle a,
                   java.awt.Shape b,
                   boolean c)

Specified by:
hit in class java.awt.Graphics2D

drawRenderedImage

public void drawRenderedImage(java.awt.image.RenderedImage a,
                              java.awt.geom.AffineTransform b)

Specified by:
drawRenderedImage in class java.awt.Graphics2D

drawRenderableImage

public void drawRenderableImage(java.awt.image.renderable.RenderableImage a,
                                java.awt.geom.AffineTransform b)

Specified by:
drawRenderableImage in class java.awt.Graphics2D

drawImage

public void drawImage(java.awt.image.BufferedImage a,
                      java.awt.image.BufferedImageOp b,
                      int c,
                      int d)

Specified by:
drawImage in class java.awt.Graphics2D

getRenderingHint

public java.lang.Object getRenderingHint(java.awt.RenderingHints.Key a)

Specified by:
getRenderingHint in class java.awt.Graphics2D

setRenderingHint

public void setRenderingHint(java.awt.RenderingHints.Key a,
                             java.lang.Object b)

Specified by:
setRenderingHint in class java.awt.Graphics2D

drawImage

public boolean drawImage(java.awt.Image a,
                         java.awt.geom.AffineTransform b,
                         java.awt.image.ImageObserver c)

Specified by:
drawImage in class java.awt.Graphics2D


Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.