org.eclipse.draw2d
Class SWTGraphics
java.lang.Object
|
+--org.eclipse.draw2d.Graphics
|
+--org.eclipse.draw2d.SWTGraphics
- public class SWTGraphics
- extends Graphics
Implementation of providing the drawing capabilities of SWT's GC class
in draw2d.
Field Summary |
static boolean |
debug
|
Method Summary |
protected void |
checkFill()
|
protected void |
checkGC()
|
protected void |
checkPaint()
|
protected void |
checkText()
|
void |
clipRect(Rectangle rect)
|
void |
dispose()
|
void |
drawArc(int x,
int y,
int width,
int height,
int offset,
int length)
|
void |
drawFocus(int x,
int y,
int w,
int h)
|
void |
drawImage(Image srcImage,
int x,
int y)
|
void |
drawImage(Image srcImage,
int x1,
int y1,
int w1,
int h1,
int x2,
int y2,
int w2,
int h2)
|
void |
drawLine(int x1,
int y1,
int x2,
int y2)
|
void |
drawOval(int x,
int y,
int width,
int height)
|
void |
drawPolygon(PointList points)
|
void |
drawPolyline(PointList points)
|
void |
drawRectangle(int x,
int y,
int width,
int height)
|
void |
drawRoundRectangle(Rectangle r,
int arcWidth,
int arcHeight)
|
void |
drawString(String s,
int x,
int y)
|
void |
drawText(String s,
int x,
int y)
|
void |
fillArc(int x,
int y,
int width,
int height,
int offset,
int length)
|
void |
fillGradient(int x,
int y,
int w,
int h,
boolean vertical)
|
void |
fillOval(int x,
int y,
int width,
int height)
|
void |
fillPolygon(PointList points)
|
void |
fillRectangle(int x,
int y,
int width,
int height)
|
void |
fillRoundRectangle(Rectangle r,
int arcWidth,
int arcHeight)
|
void |
fillString(String s,
int x,
int y)
|
void |
fillText(String s,
int x,
int y)
|
Color |
getBackgroundColor()
|
Rectangle |
getClip(Rectangle rect)
|
Font |
getFont()
|
FontMetrics |
getFontMetrics()
|
Color |
getForegroundColor()
|
int |
getLineStyle()
|
int |
getLineWidth()
|
boolean |
getXORMode()
|
protected void |
init()
|
void |
popState()
|
void |
pushState()
|
void |
restoreState()
|
protected void |
restoreState(SWTGraphics.State s)
|
void |
scale(double factor)
|
void |
setBackgroundColor(Color color)
|
void |
setClip(Rectangle rect)
|
protected void |
setClipAbsolute(int x,
int y,
int w,
int h)
|
void |
setFont(Font f)
|
void |
setForegroundColor(Color color)
|
void |
setLineStyle(int style)
|
void |
setLineWidth(int width)
|
protected void |
setTranslation(int x,
int y)
|
void |
setXORMode(boolean b)
|
void |
translate(int x,
int y)
|
Methods inherited from class org.eclipse.draw2d.Graphics |
drawArc, drawFocus, drawImage, drawImage, drawLine, drawOval, drawRectangle, drawString, drawText, fillArc, fillGradient, fillOval, fillRectangle, fillString, fillText, translate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debug
public static boolean debug
SWTGraphics
public SWTGraphics(GC gc)
checkFill
protected final void checkFill()
checkGC
protected final void checkGC()
checkPaint
protected final void checkPaint()
checkText
protected final void checkText()
clipRect
public void clipRect(Rectangle rect)
- Specified by:
clipRect
in class Graphics
dispose
public void dispose()
- Specified by:
dispose
in class Graphics
drawArc
public void drawArc(int x,
int y,
int width,
int height,
int offset,
int length)
- Specified by:
drawArc
in class Graphics
drawFocus
public void drawFocus(int x,
int y,
int w,
int h)
- Specified by:
drawFocus
in class Graphics
drawImage
public void drawImage(Image srcImage,
int x,
int y)
- Specified by:
drawImage
in class Graphics
drawImage
public void drawImage(Image srcImage,
int x1,
int y1,
int w1,
int h1,
int x2,
int y2,
int w2,
int h2)
- 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(PointList points)
- Specified by:
drawPolygon
in class Graphics
drawPolyline
public void drawPolyline(PointList points)
- Specified by:
drawPolyline
in class Graphics
drawRectangle
public void drawRectangle(int x,
int y,
int width,
int height)
- Specified by:
drawRectangle
in class Graphics
drawRoundRectangle
public void drawRoundRectangle(Rectangle r,
int arcWidth,
int arcHeight)
- Specified by:
drawRoundRectangle
in class Graphics
drawString
public void drawString(String s,
int x,
int y)
- Specified by:
drawString
in class Graphics
drawText
public void drawText(String s,
int x,
int y)
- Specified by:
drawText
in class Graphics
fillArc
public void fillArc(int x,
int y,
int width,
int height,
int offset,
int length)
- Specified by:
fillArc
in class Graphics
fillGradient
public void fillGradient(int x,
int y,
int w,
int h,
boolean vertical)
- Specified by:
fillGradient
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(PointList points)
- Specified by:
fillPolygon
in class Graphics
fillRectangle
public void fillRectangle(int x,
int y,
int width,
int height)
- Specified by:
fillRectangle
in class Graphics
fillRoundRectangle
public void fillRoundRectangle(Rectangle r,
int arcWidth,
int arcHeight)
- Specified by:
fillRoundRectangle
in class Graphics
fillString
public void fillString(String s,
int x,
int y)
- Specified by:
fillString
in class Graphics
fillText
public void fillText(String s,
int x,
int y)
- Specified by:
fillText
in class Graphics
getBackgroundColor
public Color getBackgroundColor()
- Specified by:
getBackgroundColor
in class Graphics
getClip
public Rectangle getClip(Rectangle rect)
- Specified by:
getClip
in class Graphics
getFont
public Font getFont()
- Specified by:
getFont
in class Graphics
getFontMetrics
public FontMetrics getFontMetrics()
- Specified by:
getFontMetrics
in class Graphics
getForegroundColor
public Color getForegroundColor()
- Specified by:
getForegroundColor
in class Graphics
getLineStyle
public int getLineStyle()
- Specified by:
getLineStyle
in class Graphics
getLineWidth
public int getLineWidth()
- Specified by:
getLineWidth
in class Graphics
getXORMode
public boolean getXORMode()
- Specified by:
getXORMode
in class Graphics
init
protected void init()
popState
public void popState()
- Specified by:
popState
in class Graphics
pushState
public void pushState()
- Specified by:
pushState
in class Graphics
restoreState
public void restoreState()
- Specified by:
restoreState
in class Graphics
restoreState
protected void restoreState(SWTGraphics.State s)
scale
public void scale(double factor)
- Specified by:
scale
in class Graphics
setBackgroundColor
public void setBackgroundColor(Color color)
- Specified by:
setBackgroundColor
in class Graphics
setClip
public void setClip(Rectangle rect)
- Specified by:
setClip
in class Graphics
setClipAbsolute
protected void setClipAbsolute(int x,
int y,
int w,
int h)
setFont
public void setFont(Font f)
- Specified by:
setFont
in class Graphics
setForegroundColor
public void setForegroundColor(Color color)
- Specified by:
setForegroundColor
in class Graphics
setLineStyle
public void setLineStyle(int style)
- Specified by:
setLineStyle
in class Graphics
setLineWidth
public void setLineWidth(int width)
- Specified by:
setLineWidth
in class Graphics
setTranslation
protected void setTranslation(int x,
int y)
setXORMode
public void setXORMode(boolean b)
- Specified by:
setXORMode
in class Graphics
translate
public void translate(int x,
int y)
- Specified by:
translate
in class Graphics
Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.