swingwt.awt
Class SWTGraphics2DRenderer

java.lang.Object
  extended byswingwt.awt.Graphics
      extended byswingwt.awt.Graphics2D
          extended byswingwt.awt.SWTGraphics2DRenderer

public class SWTGraphics2DRenderer
extends Graphics2D

This class is the final point for the mapped AWT graphics stuff - it provides the rendering capabilities to the Graphics/Graphics2D classes via mappings to SWT GC calls.


Field Summary
protected  Color c
          The current colour for the GC
protected  Font f
          The current font for the GC
protected  org.eclipse.swt.graphics.GC gc
          The SWT graphics context for painting
protected  boolean shouldDestroy
          Whether this object should use a finalizer based destructor.
 
Constructor Summary
SWTGraphics2DRenderer(org.eclipse.swt.graphics.GC gcon)
           
SWTGraphics2DRenderer(org.eclipse.swt.graphics.GC gc, boolean needToCleanUp)
           
 
Method Summary
 void addRenderingHints(java.util.Map hints)
          NOT IMPLEMENTED
 void clearRect(int x, int y, int width, int height)
           
 void clip(Shape s)
          NOT IMPLEMENTED
 void clipRect(int x, int y, int width, int height)
          NOT IMPLEMENTED
 void copyArea(int x, int y, int width, int height, int dx, int dy)
           
 Graphics create()
           
 void dispose()
           
 void draw(Shape s)
          NOT IMPLEMENTED
 void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
           
 void drawBytes(byte[] data, int offset, int length, int x, int y)
           
 void drawChars(char[] data, int offset, int length, int x, int y)
           
 void drawGlyphVector(GlyphVector g, float x, float y)
          NOT IMPLEMENTED
 boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
           
 boolean drawImage(Image img, int x, int y, ImageObserver observer)
           
 boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
           
 boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
           
 boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)
           
 boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
           
 void drawLine(int x1, int y1, int x2, int y2)
           
 void drawOval(int x, int y, int width, int height)
           
 void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
          NOT IMPLEMENTED
 void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
          NOT IMPLEMENTED
 void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          NOT IMPLEMENTED
 void drawString(java.lang.String str, int x, int y)
           
 void drawString(java.lang.String str, int x, int y, boolean transparent)
           
 void fill(Shape s)
          NOT IMPLEMENTED
 void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
           
 void fillOval(int x, int y, int width, int height)
           
 void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
          NOT IMPLEMENTED
 void fillRect(int x, int y, int width, int height)
           
 void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          Calls fillRect instead
protected  void finalize()
           
 Color getBackground()
           
 Shape getClip()
          NOT IMPLEMENTED
 Rectangle getClipBounds()
           
 Color getColor()
           
 Composite getComposite()
          NOT IMPLEMENTED
 GraphicsConfiguration getDeviceConfiguration()
          NOT IMPLEMENTED
 Font getFont()
           
 FontMetrics getFontMetrics(Font f)
           
 FontRenderContext getFontRenderContext()
          NOT IMPLEMENTED
 Paint getPaint()
          NOT IMPLEMENTED
 java.lang.Object getRenderingHint(java.lang.Object hintKey)
          NOT IMPLEMENTED
 RenderingHints getRenderingHints()
          NOT IMPLEMENTED
 Stroke getStroke()
          NOT IMPLEMENTED
 org.eclipse.swt.graphics.GC getSWTGC()
          Returns the SWT GC used for direct manipulation
 AffineTransform getTransform()
          NOT IMPLEMENTED
 boolean hit(Rectangle rect, Shape s, boolean onStroke)
          NOT IMPLEMENTED
 void redrawUnder(int x, int y, int width, int height)
           
 void rotate(double theta)
          NOT IMPLEMENTED
 void rotate(double theta, double x, double y)
          NOT IMPLEMENTED
 void scale(double sx, double sy)
          NOT IMPLEMENTED
 void setBackground(Color color)
           
 void setClip(int x, int y, int width, int height)
           
 void setClip(Shape clip)
          NOT IMPLEMENTED
 void setColor(Color color)
           
 void setComposite(Composite comp)
          NOT IMPLEMENTED
 void setFont(Font f)
           
 void setPaint(Paint paint)
          NOT IMPLEMENTED
 void setPaintMode()
          NOT IMPLEMENTED
 void setRenderingHint(java.lang.Object hintKey, java.lang.Object hintValue)
          NOT IMPLEMENTED
 void setRenderingHints(java.util.Map hints)
          NOT IMPLEMENTED
 void setStroke(Stroke s)
          NOT IMPLEMENTED
 void setTransform(AffineTransform Tx)
          NOT IMPLEMENTED
 void setXORMode(Color c1)
          NOT IMPLEMENTED
 void shear(double shx, double shy)
          NOT IMPLEMENTED
 void transform(AffineTransform Tx)
          NOT IMPLEMENTED
 void translate(double tx, double ty)
          NOT IMPLEMENTED
 void translate(int x, int y)
          NOT IMPLEMENTED
 
Methods inherited from class swingwt.awt.Graphics
create, draw3DRect, drawPolygon, drawRect, fill3DRect, fillPolygon, getClipBounds, getClipRect, getFontMetrics, hitClip, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

gc

protected org.eclipse.swt.graphics.GC gc
The SWT graphics context for painting


f

protected Font f
The current font for the GC


c

protected Color c
The current colour for the GC


shouldDestroy

protected boolean shouldDestroy
Whether this object should use a finalizer based destructor. This is set to false generally by Paint Events, as they will ultimately handle the GC's destruction.

Constructor Detail

SWTGraphics2DRenderer

public SWTGraphics2DRenderer(org.eclipse.swt.graphics.GC gcon)

SWTGraphics2DRenderer

public SWTGraphics2DRenderer(org.eclipse.swt.graphics.GC gc,
                             boolean needToCleanUp)
Parameters:
needToCleanUp - Set to true if you want a finalize destructor
Method Detail

create

public Graphics create()
Specified by:
create in class Graphics

dispose

public void dispose()
Specified by:
dispose in class Graphics

getSWTGC

public org.eclipse.swt.graphics.GC getSWTGC()
Returns the SWT GC used for direct manipulation


clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
Specified by:
clearRect in class Graphics

clipRect

public void clipRect(int x,
                     int y,
                     int width,
                     int height)
NOT IMPLEMENTED

Specified by:
clipRect in class Graphics

copyArea

public void copyArea(int x,
                     int y,
                     int width,
                     int height,
                     int dx,
                     int dy)
Specified by:
copyArea in class Graphics

redrawUnder

public void redrawUnder(int x,
                        int y,
                        int width,
                        int height)
Specified by:
redrawUnder in class Graphics

drawArc

public void drawArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Specified by:
drawArc in class Graphics

drawBytes

public void drawBytes(byte[] data,
                      int offset,
                      int length,
                      int x,
                      int y)
Overrides:
drawBytes in class Graphics

drawChars

public void drawChars(char[] data,
                      int offset,
                      int length,
                      int x,
                      int y)
Overrides:
drawChars in class Graphics

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         Color bgcolor,
                         ImageObserver observer)
Specified by:
drawImage in class Graphics

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         ImageObserver observer)
Specified by:
drawImage in class Graphics

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         Color bgcolor,
                         ImageObserver observer)
Specified by:
drawImage in class Graphics

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         ImageObserver observer)
Specified by:
drawImage in class Graphics

drawImage

public boolean drawImage(Image img,
                         int dx1,
                         int dy1,
                         int dx2,
                         int dy2,
                         int sx1,
                         int sy1,
                         int sx2,
                         int sy2,
                         Color bgcolor,
                         ImageObserver observer)
Specified by:
drawImage in class Graphics

drawImage

public boolean drawImage(Image img,
                         int dx1,
                         int dy1,
                         int dx2,
                         int dy2,
                         int sx1,
                         int sy1,
                         int sx2,
                         int sy2,
                         ImageObserver observer)
Specified by:
drawImage in class Graphics

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
Specified by:
drawLine in class Graphics

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height)
Specified by:
drawOval in class Graphics

drawPolygon

public void drawPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
NOT IMPLEMENTED

Specified by:
drawPolygon in class Graphics

drawPolyline

public void drawPolyline(int[] xPoints,
                         int[] yPoints,
                         int nPoints)
NOT IMPLEMENTED

Specified by:
drawPolyline in class Graphics

drawString

public void drawString(java.lang.String str,
                       int x,
                       int y)
Specified by:
drawString in class Graphics

drawString

public void drawString(java.lang.String str,
                       int x,
                       int y,
                       boolean transparent)
Specified by:
drawString in class Graphics

fillArc

public void fillArc(int x,
                    int y,
                    int width,
                    int height,
                    int startAngle,
                    int arcAngle)
Specified by:
fillArc in class Graphics

fillOval

public void fillOval(int x,
                     int y,
                     int width,
                     int height)
Specified by:
fillOval in class Graphics

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
NOT IMPLEMENTED

Specified by:
fillPolygon in class Graphics

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)
Specified by:
fillRect in class Graphics

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Calls fillRect instead

Specified by:
fillRoundRect in class Graphics

getFont

public Font getFont()
Specified by:
getFont in class Graphics

getColor

public Color getColor()
Specified by:
getColor in class Graphics

setFont

public void setFont(Font f)
Specified by:
setFont in class Graphics

setColor

public void setColor(Color color)
Specified by:
setColor in class Graphics

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

addRenderingHints

public void addRenderingHints(java.util.Map hints)
NOT IMPLEMENTED

Specified by:
addRenderingHints in class Graphics2D

clip

public void clip(Shape s)
NOT IMPLEMENTED

Specified by:
clip in class Graphics2D

draw

public void draw(Shape s)
NOT IMPLEMENTED

Specified by:
draw in class Graphics2D

drawGlyphVector

public void drawGlyphVector(GlyphVector g,
                            float x,
                            float y)
NOT IMPLEMENTED

Specified by:
drawGlyphVector in class Graphics2D

fill

public void fill(Shape s)
NOT IMPLEMENTED

Specified by:
fill in class Graphics2D

getBackground

public Color getBackground()
Specified by:
getBackground in class Graphics2D

getComposite

public Composite getComposite()
NOT IMPLEMENTED

Specified by:
getComposite in class Graphics2D

getDeviceConfiguration

public GraphicsConfiguration getDeviceConfiguration()
NOT IMPLEMENTED

Specified by:
getDeviceConfiguration in class Graphics2D

getFontRenderContext

public FontRenderContext getFontRenderContext()
NOT IMPLEMENTED

Specified by:
getFontRenderContext in class Graphics2D

getPaint

public Paint getPaint()
NOT IMPLEMENTED

Specified by:
getPaint in class Graphics2D

getRenderingHint

public java.lang.Object getRenderingHint(java.lang.Object hintKey)
NOT IMPLEMENTED

Specified by:
getRenderingHint in class Graphics2D

getRenderingHints

public RenderingHints getRenderingHints()
NOT IMPLEMENTED

Specified by:
getRenderingHints in class Graphics2D

getStroke

public Stroke getStroke()
NOT IMPLEMENTED

Specified by:
getStroke in class Graphics2D

getTransform

public AffineTransform getTransform()
NOT IMPLEMENTED

Specified by:
getTransform in class Graphics2D

hit

public boolean hit(Rectangle rect,
                   Shape s,
                   boolean onStroke)
NOT IMPLEMENTED

Specified by:
hit in class Graphics2D

rotate

public void rotate(double theta)
NOT IMPLEMENTED

Specified by:
rotate in class Graphics2D

rotate

public void rotate(double theta,
                   double x,
                   double y)
NOT IMPLEMENTED

Specified by:
rotate in class Graphics2D

scale

public void scale(double sx,
                  double sy)
NOT IMPLEMENTED

Specified by:
scale in class Graphics2D

setBackground

public void setBackground(Color color)
Specified by:
setBackground in class Graphics2D

setComposite

public void setComposite(Composite comp)
NOT IMPLEMENTED

Specified by:
setComposite in class Graphics2D

setPaint

public void setPaint(Paint paint)
NOT IMPLEMENTED

Specified by:
setPaint in class Graphics2D

setRenderingHint

public void setRenderingHint(java.lang.Object hintKey,
                             java.lang.Object hintValue)
NOT IMPLEMENTED

Specified by:
setRenderingHint in class Graphics2D

setRenderingHints

public void setRenderingHints(java.util.Map hints)
NOT IMPLEMENTED

Specified by:
setRenderingHints in class Graphics2D

setStroke

public void setStroke(Stroke s)
NOT IMPLEMENTED

Specified by:
setStroke in class Graphics2D

setTransform

public void setTransform(AffineTransform Tx)
NOT IMPLEMENTED

Specified by:
setTransform in class Graphics2D

shear

public void shear(double shx,
                  double shy)
NOT IMPLEMENTED

Specified by:
shear in class Graphics2D

transform

public void transform(AffineTransform Tx)
NOT IMPLEMENTED

Specified by:
transform in class Graphics2D

translate

public void translate(double tx,
                      double ty)
NOT IMPLEMENTED

Specified by:
translate in class Graphics2D

translate

public void translate(int x,
                      int y)
NOT IMPLEMENTED

Specified by:
translate in class Graphics2D

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
NOT IMPLEMENTED

Specified by:
drawRoundRect in class Graphics

getClip

public Shape getClip()
NOT IMPLEMENTED

Specified by:
getClip in class Graphics

getClipBounds

public Rectangle getClipBounds()
Specified by:
getClipBounds in class Graphics

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Specified by:
getFontMetrics in class Graphics

setClip

public void setClip(Shape clip)
NOT IMPLEMENTED

Specified by:
setClip in class Graphics

setClip

public void setClip(int x,
                    int y,
                    int width,
                    int height)
Specified by:
setClip in class Graphics

setPaintMode

public void setPaintMode()
NOT IMPLEMENTED

Specified by:
setPaintMode in class Graphics

setXORMode

public void setXORMode(Color c1)
NOT IMPLEMENTED

Specified by:
setXORMode in class Graphics