Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Class java.awt.swing.DebugGraphics

java.lang.Object
    |
    +----java.awt.Graphics
            |
            +----java.awt.swing.DebugGraphics

public class DebugGraphics
extends Graphics
Graphics subclass supporting graphics debugging. Overrides most methods from Graphics. DebugGraphics objects are rarely created by hand. They are most frequently created automatically when a JComponent's debugGraphicsOptions are changed using the setDebugGraphicsOptions() method.

See Also:
setDebugGraphicsOptions

Field Summary
static int  BUFFERED_OPTION
Show buffered operations in a seperate Frame.
static int  FLASH_OPTION
Flash graphics operations.
static int  LOG_OPTION
Log graphics operations.
static int  NONE_OPTION
Don't debug graphics operations.
 

Constructor Summary
 DebugGraphics()
 
 DebugGraphics(Graphics graphics, JComponent component)
Handle on AWT Graphics
 DebugGraphics(Graphics graphics)
 
 

Method Summary
void  clearRect(int x, int y, int width, int height)
 
void  clipRect(int x, int y, int width, int height)
 
void  copyArea(int x, int y, int width, int height, int destX, int destY)
 
Graphics  create()
 
Graphics  create(int x, int y, int width, int height)
 
void  dispose()
 
void  draw3DRect(int x, int y, int width, int height, boolean raised)
 
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)
 
boolean  drawImage(Image img, int x, int y, ImageObserver observer)
 
boolean  drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
 
boolean  drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
 
boolean  drawImage(Image img, int x, int y, int width, int height, 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)
 
boolean  drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, 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)
 
void  drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
 
void  drawRect(int x, int y, int width, int height)
 
void  drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
 
void  drawString(String aString, int x, int y)
 
void  fill3DRect(int x, int y, int width, int height, boolean raised)
 
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)
 
void  fillRect(int x, int y, int width, int height)
 
void  fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
 
static Color  flashColor()
Returns the Color used to flash drawing operations.
static int  flashCount()
Returns the number of times that drawing operations will flash.
static int  flashTime()
Returns the time delay of drawing operation flashing.
Shape  getClip()
 
Rectangle  getClipBounds()
 
Color  getColor()
Returns the Color used for text drawing operations.
int  getDebugOptions()
Returns the current debugging options for this DebugGraphics.
Font  getFont()
Returns the Font used for text drawing operations.
FontMetrics  getFontMetrics()
 
FontMetrics  getFontMetrics(Font f)
 
boolean  isDrawingBuffer()
 
static PrintStream  logStream()
Returns the stream to which the DebugGraphics logs drawing operations.
void  setClip(int x, int y, int width, int height)
 
void  setClip(Shape clip)
 
void  setColor(Color aColor)
Sets the color to be used for drawing and filling lines and shapes.
void  setDebugOptions(int options)
Enables/disables diagnostic information about every graphics operation.
static void  setFlashColor(Color flashColor)
Sets the Color used to flash drawing operations.
static void  setFlashCount(int flashCount)
Sets the number of times that drawing operations will flash.
static void  setFlashTime(int flashTime)
Sets the time delay of drawing operation flashing.
void  setFont(Font aFont)
Sets the Font used for text drawing operations.
static void  setLogStream(PrintStream stream)
Sets the stream to which the DebugGraphics logs drawing operations.
void  setPaintMode()
 
void  setXORMode(Color aColor)
 
void  translate(int x, int y)
 
 
Methods inherited from class java.awt.Graphics
 clearRect, clipRect, copyArea, create, create, dispose, draw3DRect, drawArc, drawBytes, drawChars, drawImage, drawImage, drawImage, drawImage, drawImage, drawImage, drawLine, drawOval, drawPolygon, drawPolygon, drawPolyline, drawRect, drawRoundRect, drawString, fill3DRect, fillArc, fillOval, fillPolygon, fillPolygon, fillRect, fillRoundRect, finalize, getClip, getClipBounds, getClipBounds, getClipRect, getColor, getFont, getFontMetrics, getFontMetrics, hitClip, setClip, setClip, setColor, setFont, setPaintMode, setXORMode, toString, translate
 
Methods inherited from class java.lang.Object
 clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_OPTION

public static final int LOG_OPTION
Log graphics operations.

FLASH_OPTION

public static final int FLASH_OPTION
Flash graphics operations.

BUFFERED_OPTION

public static final int BUFFERED_OPTION
Show buffered operations in a seperate Frame.

NONE_OPTION

public static final int NONE_OPTION
Don't debug graphics operations.
Constructor Detail

DebugGraphics

public DebugGraphics()

DebugGraphics

public DebugGraphics(Graphics graphics,
                     JComponent component)
Handle on AWT Graphics

DebugGraphics

public DebugGraphics(Graphics graphics)
Method Detail

create

public Graphics create()
Overrides:
create in class Graphics

create

public Graphics create(int x,
                       int y,
                       int width,
                       int height)
Overrides:
create in class Graphics

setFlashColor

public static void setFlashColor(Color flashColor)
Sets the Color used to flash drawing operations.

flashColor

public static Color flashColor()
Returns the Color used to flash drawing operations.
See Also:
setFlashColor

setFlashTime

public static void setFlashTime(int flashTime)
Sets the time delay of drawing operation flashing.

flashTime

public static int flashTime()
Returns the time delay of drawing operation flashing.
See Also:
setFlashTime

setFlashCount

public static void setFlashCount(int flashCount)
Sets the number of times that drawing operations will flash.

flashCount

public static int flashCount()
Returns the number of times that drawing operations will flash.
See Also:
setFlashCount

setLogStream

public static void setLogStream(PrintStream stream)
Sets the stream to which the DebugGraphics logs drawing operations.

logStream

public static PrintStream logStream()
Returns the stream to which the DebugGraphics logs drawing operations.
See Also:
setLogStream

setFont

public void setFont(Font aFont)
Sets the Font used for text drawing operations.
Overrides:
setFont in class Graphics

getFont

public Font getFont()
Returns the Font used for text drawing operations.
Overrides:
getFont in class Graphics
See Also:
setFont

setColor

public void setColor(Color aColor)
Sets the color to be used for drawing and filling lines and shapes.
Overrides:
setColor in class Graphics

getColor

public Color getColor()
Returns the Color used for text drawing operations.
Overrides:
getColor in class Graphics
See Also:
setColor

getFontMetrics

public FontMetrics getFontMetrics()
Overrides:
getFontMetrics in class Graphics

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Overrides:
getFontMetrics in class Graphics

translate

public void translate(int x,
                      int y)
Overrides:
translate in class Graphics

setPaintMode

public void setPaintMode()
Overrides:
setPaintMode in class Graphics

setXORMode

public void setXORMode(Color aColor)
Overrides:
setXORMode in class Graphics

getClipBounds

public Rectangle getClipBounds()
Overrides:
getClipBounds in class Graphics

clipRect

public void clipRect(int x,
                     int y,
                     int width,
                     int height)
Overrides:
clipRect in class Graphics

setClip

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

getClip

public Shape getClip()
Overrides:
getClip in class Graphics

setClip

public void setClip(Shape clip)
Overrides:
setClip in class Graphics

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height)
Overrides:
drawRect in class Graphics

fillRect

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

clearRect

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

drawRoundRect

public void drawRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Overrides:
drawRoundRect in class Graphics

fillRoundRect

public void fillRoundRect(int x,
                          int y,
                          int width,
                          int height,
                          int arcWidth,
                          int arcHeight)
Overrides:
fillRoundRect in class Graphics

drawLine

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

draw3DRect

public void draw3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Overrides:
draw3DRect in class Graphics

fill3DRect

public void fill3DRect(int x,
                       int y,
                       int width,
                       int height,
                       boolean raised)
Overrides:
fill3DRect in class Graphics

drawOval

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

fillOval

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

drawArc

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

fillArc

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

drawPolyline

public void drawPolyline(int[] xPoints,
                         int[] yPoints,
                         int nPoints)
Overrides:
drawPolyline in class Graphics

drawPolygon

public void drawPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Overrides:
drawPolygon in class Graphics

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Overrides:
fillPolygon in class Graphics

drawString

public void drawString(String aString,
                       int x,
                       int y)
Overrides:
drawString 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,
                         ImageObserver observer)
Overrides:
drawImage in class Graphics

drawImage

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

drawImage

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

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         Color bgcolor,
                         ImageObserver observer)
Overrides:
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)
Overrides:
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)
Overrides:
drawImage in class Graphics

copyArea

public void copyArea(int x,
                     int y,
                     int width,
                     int height,
                     int destX,
                     int destY)
Overrides:
copyArea in class Graphics

dispose

public void dispose()
Overrides:
dispose in class Graphics

isDrawingBuffer

public boolean isDrawingBuffer()

setDebugOptions

public void setDebugOptions(int options)
Enables/disables diagnostic information about every graphics operation. The value of options indicates how this information should be displayed. LOG_OPTION causes a text message to be printed. FLASH_OPTION causes the drawing to flash several times. BUFFERED_OPTION creates a new Frame that shows each operation on an offscreen buffer. The value of options is bitwise OR'd into the current value. To disable debugging use NONE_OPTION.

getDebugOptions

public int getDebugOptions()
Returns the current debugging options for this DebugGraphics.
See Also:
setDebugOptions

Contents | Package | Class | Tree | Deprecated | Index | Help Java 1.2 Beta 3
PREV | NEXT SHOW LISTS | HIDE LISTS

Submit a bug or feature
Submit comments/suggestions about new javadoc look.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.