javax.swing
Class DebugGraphics

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

public class DebugGraphics
extends Graphics

Unsafe: 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.

NOTE: You must turn off double buffering to use DebugGraphics: RepaintManager repaintManager = RepaintManager.currentManager(component); repaintManager.setDoubleBufferingEnabled(false);

Version:
1.22 12/03/01
Author:
Dave Karlton
See Also:
JComponent.setDebugGraphicsOptions(int), RepaintManager.currentManager(java.awt.Component), RepaintManager.setDoubleBufferingEnabled(boolean)

Field Summary
(package private)  Image buffer
           
static int BUFFERED_OPTION
          Enabled: Show buffered operations in a separate Frame.
private static Class debugGraphicsInfoKey
           
(package private)  int debugOptions
           
static int FLASH_OPTION
          Enabled: Flash graphics operations.
(package private)  Graphics graphics
           
private static int graphicsCount
           
(package private)  int graphicsID
           
static int LOG_OPTION
          Enabled: Log graphics operations.
static int NONE_OPTION
          Enabled: Don't debug graphics operations.
(package private)  int xOffset
           
(package private)  int yOffset
           
 
Constructor Summary
DebugGraphics()
          Suppressed: Constructs a new debug graphics context that supports slowed down drawing.
DebugGraphics(Graphics graphics)
          Suppressed: Constructs a debug graphics context from an existing graphics context that supports slowed down drawing.
DebugGraphics(Graphics graphics, JComponent component)
          Suppressed: Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component.
 
Method Summary
 void clearRect(int x, int y, int width, int height)
          Suppressed: Overrides Graphics.clearRect.
 void clipRect(int x, int y, int width, int height)
          Suppressed: Overrides Graphics.clipRect.
 void copyArea(int x, int y, int width, int height, int destX, int destY)
          Suppressed: Overrides Graphics.copyArea.
 Graphics create()
          Suppressed: Overrides Graphics.create to return a DebugGraphics object.
 Graphics create(int x, int y, int width, int height)
          Suppressed: Overrides Graphics.create to return a DebugGraphics object.
(package private)  boolean debugBuffered()
           
(package private) static int debugComponentCount()
          Returns the number of JComponents that have debugging options turned on.
(package private)  boolean debugFlash()
           
private  Graphics debugGraphics()
          Returns a DebugGraphics for use in buffering window.
(package private)  boolean debugLog()
           
 void dispose()
          Suppressed: Overrides Graphics.dispose.
 void draw3DRect(int x, int y, int width, int height, boolean raised)
          Suppressed: Overrides Graphics.draw3DRect.
 void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
          Suppressed: Overrides Graphics.drawArc.
 void drawBytes(byte[] data, int offset, int length, int x, int y)
          Suppressed: Overrides Graphics.drawBytes.
 void drawChars(char[] data, int offset, int length, int x, int y)
          Suppressed: Overrides Graphics.drawChars.
 boolean drawImage(Image img, int x, int y, Color bgcolor, java.awt.image.ImageObserver observer)
          Suppressed: Overrides Graphics.drawImage.
 boolean drawImage(Image img, int x, int y, java.awt.image.ImageObserver observer)
          Suppressed: Overrides Graphics.drawImage.
 boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, java.awt.image.ImageObserver observer)
          Suppressed: Overrides Graphics.drawImage.
 boolean drawImage(Image img, int x, int y, int width, int height, java.awt.image.ImageObserver observer)
          Suppressed: Overrides Graphics.drawImage.
 boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color bgcolor, java.awt.image.ImageObserver observer)
          Suppressed: Overrides Graphics.drawImage.
 boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, java.awt.image.ImageObserver observer)
          Suppressed: Overrides Graphics.drawImage.
 void drawLine(int x1, int y1, int x2, int y2)
          Suppressed: Overrides Graphics.drawLine.
 void drawOval(int x, int y, int width, int height)
          Suppressed: Overrides Graphics.drawOval.
 void drawPolygon(int[] xPoints, int[] yPoints, int nPoints)
          Suppressed: Overrides Graphics.drawPolygon.
 void drawPolyline(int[] xPoints, int[] yPoints, int nPoints)
          Suppressed: Overrides Graphics.drawPolyline.
 void drawRect(int x, int y, int width, int height)
          Suppressed: Overrides Graphics.drawRect.
 void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          Suppressed: Overrides Graphics.drawRoundRect.
 void drawString(java.text.AttributedCharacterIterator iterator, int x, int y)
          Suppressed: Overrides Graphics.drawString.
 void drawString(String aString, int x, int y)
          Suppressed: Overrides Graphics.drawString.
 void fill3DRect(int x, int y, int width, int height, boolean raised)
          Suppressed: Overrides Graphics.fill3DRect.
 void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
          Suppressed: Overrides Graphics.fillArc.
 void fillOval(int x, int y, int width, int height)
          Suppressed: Overrides Graphics.fillOval.
 void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
          Suppressed: Overrides Graphics.fillPolygon.
 void fillRect(int x, int y, int width, int height)
          Suppressed: Overrides Graphics.fillRect.
 void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
          Suppressed: Overrides Graphics.fillRoundRect.
static Color flashColor()
          Suppressed: Returns the Color used to flash drawing operations.
static int flashCount()
          Suppressed: Returns the number of times that drawing operations will flash.
static int flashTime()
          Suppressed: Returns the time delay of drawing operation flashing.
 Shape getClip()
          Suppressed: Overrides Graphics.getClip.
 Rectangle getClipBounds()
          Suppressed: Overrides Graphics.getClipBounds.
 Color getColor()
          Suppressed: Returns the Color used for text drawing operations.
 int getDebugOptions()
          Suppressed: Returns the current debugging options for this DebugGraphics.
(package private) static int getDebugOptions(JComponent component)
          Static wrapper method for DebugGraphicsInfo.getDebugOptions().
 Font getFont()
          Suppressed: Returns the Font used for text drawing operations.
 FontMetrics getFontMetrics()
          Suppressed: Overrides Graphics.getFontMetrics.
 FontMetrics getFontMetrics(Font f)
          Suppressed: Overrides Graphics.getFontMetrics.
(package private) static DebugGraphicsInfo info()
          Returns DebugGraphicsInfo, or creates one if none exists.
 boolean isDrawingBuffer()
          Suppressed: Returns the drawingBuffer value.
static PrintStream logStream()
          Suppressed: Returns the stream to which the DebugGraphics logs drawing operations.
(package private)  String pointToString(int x, int y)
           
 void setClip(int x, int y, int width, int height)
          Suppressed: Overrides Graphics.setClip.
 void setClip(Shape clip)
          Suppressed: Overrides Graphics.setClip.
 void setColor(Color aColor)
          Suppressed: Sets the color to be used for drawing and filling lines and shapes.
 void setDebugOptions(int options)
          Suppressed: Enables/disables diagnostic information about every graphics operation.
(package private) static void setDebugOptions(JComponent component, int options)
          Static wrapper method for DebugGraphicsInfo.setDebugOptions().
static void setFlashColor(Color flashColor)
          Suppressed: Sets the Color used to flash drawing operations.
static void setFlashCount(int flashCount)
          Suppressed: Sets the number of times that drawing operations will flash.
static void setFlashTime(int flashTime)
          Suppressed: Sets the time delay of drawing operation flashing.
 void setFont(Font aFont)
          Suppressed: Sets the Font used for text drawing operations.
static void setLogStream(PrintStream stream)
          Suppressed: Sets the stream to which the DebugGraphics logs drawing operations.
 void setPaintMode()
          Suppressed: Overrides Graphics.setPaintMode.
 void setXORMode(Color aColor)
          Suppressed: Overrides Graphics.setXORMode.
(package private) static int shouldComponentDebug(JComponent component)
          Returns non-zero if component should display with DebugGraphics, zero otherwise.
(package private)  void sleep(int mSecs)
           
(package private)  String toShortString()
           
 void translate(int x, int y)
          Suppressed: Overrides Graphics.translate.
 
Methods inherited from class java.awt.Graphics
drawPolygon, fillPolygon, finalize, getClipBounds, getClipRect, hitClip, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

graphics

Graphics graphics

buffer

Image buffer

debugOptions

int debugOptions

graphicsID

int graphicsID

xOffset

int xOffset

yOffset

int yOffset

graphicsCount

private static int graphicsCount

LOG_OPTION

public static final int LOG_OPTION
Enabled: Log graphics operations.


FLASH_OPTION

public static final int FLASH_OPTION
Enabled: Flash graphics operations.


BUFFERED_OPTION

public static final int BUFFERED_OPTION
Enabled: Show buffered operations in a separate Frame.


NONE_OPTION

public static final int NONE_OPTION
Enabled: Don't debug graphics operations.


debugGraphicsInfoKey

private static final Class debugGraphicsInfoKey
Constructor Detail

DebugGraphics

public DebugGraphics()
Suppressed: Constructs a new debug graphics context that supports slowed down drawing.


DebugGraphics

public DebugGraphics(Graphics graphics,
                     JComponent component)
Suppressed: Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component.

Parameters:
graphics - the Graphics context to slow down
component - the JComponent to draw slowly

DebugGraphics

public DebugGraphics(Graphics graphics)
Suppressed: Constructs a debug graphics context from an existing graphics context that supports slowed down drawing.

Parameters:
graphics - the Graphics context to slow down
Method Detail

create

public Graphics create()
Suppressed: Overrides Graphics.create to return a DebugGraphics object.

Specified by:
create in class Graphics
Returns:
a new graphics context that is a copy of this graphics context.

create

public Graphics create(int x,
                       int y,
                       int width,
                       int height)
Suppressed: Overrides Graphics.create to return a DebugGraphics object.

Overrides:
create in class Graphics
Parameters:
x - the x coordinate.
y - the y coordinate.
width - the width of the clipping rectangle.
height - the height of the clipping rectangle.
Returns:
a new graphics context.
See Also:
java.awt.Graphics#translate, java.awt.Graphics#clipRect

setFlashColor

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


flashColor

public static Color flashColor()
Suppressed: Returns the Color used to flash drawing operations.

See Also:
setFlashColor(java.awt.Color)

setFlashTime

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


flashTime

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

See Also:
setFlashTime(int)

setFlashCount

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


flashCount

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

See Also:
setFlashCount(int)

setLogStream

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


logStream

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

See Also:
setLogStream(java.io.PrintStream)

setFont

public void setFont(Font aFont)
Suppressed: Sets the Font used for text drawing operations.

Specified by:
setFont in class Graphics
Parameters:
aFont - the font.
See Also:
java.awt.Graphics#getFont, java.awt.Graphics#drawString(java.lang.String, int, int), java.awt.Graphics#drawBytes(byte[], int, int, int, int), java.awt.Graphics#drawChars(char[], int, int, int, int)

getFont

public Font getFont()
Suppressed: Returns the Font used for text drawing operations.

Specified by:
getFont in class Graphics
Returns:
this graphics context's current font.
See Also:
setFont(java.awt.Font)

setColor

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

Specified by:
setColor in class Graphics
Parameters:
aColor - the new rendering color.
See Also:
java.awt.Color, java.awt.Graphics#getColor

getColor

public Color getColor()
Suppressed: Returns the Color used for text drawing operations.

Specified by:
getColor in class Graphics
Returns:
this graphics context's current color.
See Also:
setColor(java.awt.Color)

getFontMetrics

public FontMetrics getFontMetrics()
Suppressed: Overrides Graphics.getFontMetrics.

Overrides:
getFontMetrics in class Graphics
Returns:
the font metrics of this graphics context's current font.
See Also:
java.awt.Graphics#getFont, java.awt.FontMetrics, java.awt.Graphics#getFontMetrics(Font)

getFontMetrics

public FontMetrics getFontMetrics(Font f)
Suppressed: Overrides Graphics.getFontMetrics.

Specified by:
getFontMetrics in class Graphics
Parameters:
f - the specified font
Returns:
the font metrics for the specified font.
See Also:
java.awt.Graphics#getFont, java.awt.FontMetrics, java.awt.Graphics#getFontMetrics()

translate

public void translate(int x,
                      int y)
Suppressed: Overrides Graphics.translate.

Specified by:
translate in class Graphics
Parameters:
x - the x coordinate.
y - the y coordinate.

setPaintMode

public void setPaintMode()
Suppressed: Overrides Graphics.setPaintMode.

Specified by:
setPaintMode in class Graphics

setXORMode

public void setXORMode(Color aColor)
Suppressed: Overrides Graphics.setXORMode.

Specified by:
setXORMode in class Graphics
Parameters:
aColor - the XOR alternation color

getClipBounds

public Rectangle getClipBounds()
Suppressed: Overrides Graphics.getClipBounds.

Specified by:
getClipBounds in class Graphics
Returns:
the bounding rectangle of the current clipping area, or null if no clip is set.
See Also:
java.awt.Graphics#getClip, java.awt.Graphics#clipRect, java.awt.Graphics#setClip(int, int, int, int), java.awt.Graphics#setClip(Shape)

clipRect

public void clipRect(int x,
                     int y,
                     int width,
                     int height)
Suppressed: Overrides Graphics.clipRect.

Specified by:
clipRect in class Graphics
Parameters:
x - the x coordinate of the rectangle to intersect the clip with
y - the y coordinate of the rectangle to intersect the clip with
width - the width of the rectangle to intersect the clip with
height - the height of the rectangle to intersect the clip with
See Also:
Graphics.setClip(int, int, int, int), Graphics.setClip(Shape)

setClip

public void setClip(int x,
                    int y,
                    int width,
                    int height)
Suppressed: Overrides Graphics.setClip.

Specified by:
setClip in class Graphics
Parameters:
x - the x coordinate of the new clip rectangle.
y - the y coordinate of the new clip rectangle.
width - the width of the new clip rectangle.
height - the height of the new clip rectangle.
See Also:
java.awt.Graphics#clipRect, java.awt.Graphics#setClip(Shape), java.awt.Graphics#getClip

getClip

public Shape getClip()
Suppressed: Overrides Graphics.getClip.

Specified by:
getClip in class Graphics
Returns:
a Shape object representing the current clipping area, or null if no clip is set.
See Also:
java.awt.Graphics#getClipBounds, java.awt.Graphics#clipRect, java.awt.Graphics#setClip(int, int, int, int), java.awt.Graphics#setClip(Shape)

setClip

public void setClip(Shape clip)
Suppressed: Overrides Graphics.setClip.

Specified by:
setClip in class Graphics
Parameters:
clip - the Shape to use to set the clip
See Also:
java.awt.Graphics#getClip(), java.awt.Graphics#clipRect, java.awt.Graphics#setClip(int, int, int, int)

drawRect

public void drawRect(int x,
                     int y,
                     int width,
                     int height)
Suppressed: Overrides Graphics.drawRect.

Overrides:
drawRect in class Graphics
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
See Also:
java.awt.Graphics#fillRect, java.awt.Graphics#clearRect

fillRect

public void fillRect(int x,
                     int y,
                     int width,
                     int height)
Suppressed: Overrides Graphics.fillRect.

Specified by:
fillRect in class Graphics
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
See Also:
java.awt.Graphics#clearRect, java.awt.Graphics#drawRect

clearRect

public void clearRect(int x,
                      int y,
                      int width,
                      int height)
Suppressed: Overrides Graphics.clearRect.

Specified by:
clearRect in class Graphics
Parameters:
x - the x coordinate of the rectangle to clear.
y - the y coordinate of the rectangle to clear.
width - the width of the rectangle to clear.
height - the height of the rectangle to clear.
See Also:
java.awt.Graphics#fillRect(int, int, int, int), java.awt.Graphics#drawRect, java.awt.Graphics#setColor(java.awt.Color), java.awt.Graphics#setPaintMode, java.awt.Graphics#setXORMode(java.awt.Color)

drawRoundRect

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

Specified by:
drawRoundRect in class Graphics
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
arcWidth - the horizontal diameter of the arc at the four corners.
arcHeight - the vertical diameter of the arc at the four corners.
See Also:
java.awt.Graphics#fillRoundRect

fillRoundRect

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

Specified by:
fillRoundRect in class Graphics
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
arcWidth - the horizontal diameter of the arc at the four corners.
arcHeight - the vertical diameter of the arc at the four corners.
See Also:
java.awt.Graphics#drawRoundRect

drawLine

public void drawLine(int x1,
                     int y1,
                     int x2,
                     int y2)
Suppressed: Overrides Graphics.drawLine.

Specified by:
drawLine in class Graphics
Parameters:
x1 - the first point's x coordinate.
y1 - the first point's y coordinate.
x2 - the second point's x coordinate.
y2 - the second point's y coordinate.

draw3DRect

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

Overrides:
draw3DRect in class Graphics
Parameters:
x - the x coordinate of the rectangle to be drawn.
y - the y coordinate of the rectangle to be drawn.
width - the width of the rectangle to be drawn.
height - the height of the rectangle to be drawn.
raised - a boolean that determines whether the rectangle appears to be raised above the surface or sunk into the surface.
See Also:
java.awt.Graphics#fill3DRect

fill3DRect

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

Overrides:
fill3DRect in class Graphics
Parameters:
x - the x coordinate of the rectangle to be filled.
y - the y coordinate of the rectangle to be filled.
width - the width of the rectangle to be filled.
height - the height of the rectangle to be filled.
raised - a boolean value that determines whether the rectangle appears to be raised above the surface or etched into the surface.
See Also:
java.awt.Graphics#draw3DRect

drawOval

public void drawOval(int x,
                     int y,
                     int width,
                     int height)
Suppressed: Overrides Graphics.drawOval.

Specified by:
drawOval in class Graphics
Parameters:
x - the x coordinate of the upper left corner of the oval to be drawn.
y - the y coordinate of the upper left corner of the oval to be drawn.
width - the width of the oval to be drawn.
height - the height of the oval to be drawn.
See Also:
java.awt.Graphics#fillOval

fillOval

public void fillOval(int x,
                     int y,
                     int width,
                     int height)
Suppressed: Overrides Graphics.fillOval.

Specified by:
fillOval in class Graphics
Parameters:
x - the x coordinate of the upper left corner of the oval to be filled.
y - the y coordinate of the upper left corner of the oval to be filled.
width - the width of the oval to be filled.
height - the height of the oval to be filled.
See Also:
java.awt.Graphics#drawOval

drawArc

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

Specified by:
drawArc in class Graphics
Parameters:
x - the x coordinate of the upper-left corner of the arc to be drawn.
y - the y coordinate of the upper-left corner of the arc to be drawn.
width - the width of the arc to be drawn.
height - the height of the arc to be drawn.
startAngle - the beginning angle.
arcAngle - the angular extent of the arc, relative to the start angle.
See Also:
java.awt.Graphics#fillArc

fillArc

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

Specified by:
fillArc in class Graphics
Parameters:
x - the x coordinate of the upper-left corner of the arc to be filled.
y - the y coordinate of the upper-left corner of the arc to be filled.
width - the width of the arc to be filled.
height - the height of the arc to be filled.
startAngle - the beginning angle.
arcAngle - the angular extent of the arc, relative to the start angle.
See Also:
java.awt.Graphics#drawArc

drawPolyline

public void drawPolyline(int[] xPoints,
                         int[] yPoints,
                         int nPoints)
Suppressed: Overrides Graphics.drawPolyline.

Specified by:
drawPolyline in class Graphics
Parameters:
xPoints - an array of x points
yPoints - an array of y points
nPoints - the total number of points
See Also:
java.awt.Graphics#drawPolygon(int[], int[], int)

drawPolygon

public void drawPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Suppressed: Overrides Graphics.drawPolygon.

Specified by:
drawPolygon in class Graphics
Parameters:
xPoints - a an array of x coordinates.
yPoints - a an array of y coordinates.
nPoints - a the total number of points.
See Also:
java.awt.Graphics#fillPolygon, java.awt.Graphics#drawPolyline

fillPolygon

public void fillPolygon(int[] xPoints,
                        int[] yPoints,
                        int nPoints)
Suppressed: Overrides Graphics.fillPolygon.

Specified by:
fillPolygon in class Graphics
Parameters:
xPoints - a an array of x coordinates.
yPoints - a an array of y coordinates.
nPoints - a the total number of points.
See Also:
java.awt.Graphics#drawPolygon(int[], int[], int)

drawString

public void drawString(String aString,
                       int x,
                       int y)
Suppressed: Overrides Graphics.drawString.

Specified by:
drawString in class Graphics
Parameters:
aString - the string to be drawn.
x - the x coordinate.
y - the y coordinate.
See Also:
java.awt.Graphics#drawBytes, java.awt.Graphics#drawChars

drawString

public void drawString(java.text.AttributedCharacterIterator iterator,
                       int x,
                       int y)
Suppressed: Overrides Graphics.drawString.

Specified by:
drawString in class Graphics
Parameters:
iterator - the iterator whose text is to be drawn
x - the x coordinate.
y - the y coordinate.
See Also:
java.awt.Graphics#drawBytes, java.awt.Graphics#drawChars

drawBytes

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

Overrides:
drawBytes in class Graphics
Parameters:
data - the data to be drawn
offset - the start offset in the data
length - the number of bytes that are drawn
x - the x coordinate of the baseline of the text
y - the y coordinate of the baseline of the text
See Also:
java.awt.Graphics#drawChars, java.awt.Graphics#drawString

drawChars

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

Overrides:
drawChars in class Graphics
Parameters:
data - the array of characters to be drawn
offset - the start offset in the data
length - the number of characters to be drawn
x - the x coordinate of the baseline of the text
y - the y coordinate of the baseline of the text
See Also:
java.awt.Graphics#drawBytes, java.awt.Graphics#drawString

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         java.awt.image.ImageObserver observer)
Suppressed: Overrides Graphics.drawImage.

Specified by:
drawImage in class Graphics
Parameters:
img - the specified image to be drawn.
x - the x coordinate.
y - the y coordinate.
observer - object to be notified as more of the image is converted.
Returns:
true if the image is completely loaded; false otherwise.
See Also:
java.awt.Image, java.awt.image.ImageObserver, java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         java.awt.image.ImageObserver observer)
Suppressed: Overrides Graphics.drawImage.

Specified by:
drawImage in class Graphics
Parameters:
img - the specified image to be drawn.
x - the x coordinate.
y - the y coordinate.
width - the width of the rectangle.
height - the height of the rectangle.
observer - object to be notified as more of the image is converted.
Returns:
true if the current output representation is complete; false otherwise.
See Also:
java.awt.Image, java.awt.image.ImageObserver, java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         Color bgcolor,
                         java.awt.image.ImageObserver observer)
Suppressed: Overrides Graphics.drawImage.

Specified by:
drawImage in class Graphics
Parameters:
img - the specified image to be drawn.
x - the x coordinate.
y - the y coordinate.
bgcolor - the background color to paint under the non-opaque portions of the image.
observer - object to be notified as more of the image is converted.
Returns:
true if the image is completely loaded; false otherwise.
See Also:
java.awt.Image, java.awt.image.ImageObserver, java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int x,
                         int y,
                         int width,
                         int height,
                         Color bgcolor,
                         java.awt.image.ImageObserver observer)
Suppressed: Overrides Graphics.drawImage.

Specified by:
drawImage in class Graphics
Parameters:
img - the specified image to be drawn.
x - the x coordinate.
y - the y coordinate.
width - the width of the rectangle.
height - the height of the rectangle.
bgcolor - the background color to paint under the non-opaque portions of the image.
observer - object to be notified as more of the image is converted.
Returns:
true if the current output representation is complete; false otherwise.
See Also:
java.awt.Image, java.awt.image.ImageObserver, java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int dx1,
                         int dy1,
                         int dx2,
                         int dy2,
                         int sx1,
                         int sy1,
                         int sx2,
                         int sy2,
                         java.awt.image.ImageObserver observer)
Suppressed: Overrides Graphics.drawImage.

Specified by:
drawImage in class Graphics
Parameters:
img - the specified image to be drawn
dx1 - the x coordinate of the first corner of the destination rectangle.
dy1 - the y coordinate of the first corner of the destination rectangle.
dx2 - the x coordinate of the second corner of the destination rectangle.
dy2 - the y coordinate of the second corner of the destination rectangle.
sx1 - the x coordinate of the first corner of the source rectangle.
sy1 - the y coordinate of the first corner of the source rectangle.
sx2 - the x coordinate of the second corner of the source rectangle.
sy2 - the y coordinate of the second corner of the source rectangle.
observer - object to be notified as more of the image is scaled and converted.
Returns:
true if the current output representation is complete; false otherwise.
See Also:
java.awt.Image, java.awt.image.ImageObserver, java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)

drawImage

public boolean drawImage(Image img,
                         int dx1,
                         int dy1,
                         int dx2,
                         int dy2,
                         int sx1,
                         int sy1,
                         int sx2,
                         int sy2,
                         Color bgcolor,
                         java.awt.image.ImageObserver observer)
Suppressed: Overrides Graphics.drawImage.

Specified by:
drawImage in class Graphics
Parameters:
img - the specified image to be drawn
dx1 - the x coordinate of the first corner of the destination rectangle.
dy1 - the y coordinate of the first corner of the destination rectangle.
dx2 - the x coordinate of the second corner of the destination rectangle.
dy2 - the y coordinate of the second corner of the destination rectangle.
sx1 - the x coordinate of the first corner of the source rectangle.
sy1 - the y coordinate of the first corner of the source rectangle.
sx2 - the x coordinate of the second corner of the source rectangle.
sy2 - the y coordinate of the second corner of the source rectangle.
bgcolor - the background color to paint under the non-opaque portions of the image.
observer - object to be notified as more of the image is scaled and converted.
Returns:
true if the current output representation is complete; false otherwise.
See Also:
java.awt.Image, java.awt.image.ImageObserver, java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int)

copyArea

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

Specified by:
copyArea in class Graphics
Parameters:
x - the x coordinate of the source rectangle.
y - the y coordinate of the source rectangle.
width - the width of the source rectangle.
height - the height of the source rectangle.
destX - the horizontal distance to copy the pixels.
destY - the vertical distance to copy the pixels.

sleep

final void sleep(int mSecs)

dispose

public void dispose()
Suppressed: Overrides Graphics.dispose.

Specified by:
dispose in class Graphics
See Also:
java.awt.Graphics#finalize, java.awt.Component#paint, java.awt.Component#update, java.awt.Component#getGraphics, java.awt.Graphics#create

isDrawingBuffer

public boolean isDrawingBuffer()
Suppressed: Returns the drawingBuffer value.

Returns:
true if this object is drawing from a Buffer

toShortString

String toShortString()

pointToString

String pointToString(int x,
                     int y)

setDebugOptions

public void setDebugOptions(int options)
Suppressed: 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()
Suppressed: Returns the current debugging options for this DebugGraphics.

See Also:
setDebugOptions(int)

setDebugOptions

static void setDebugOptions(JComponent component,
                            int options)
Static wrapper method for DebugGraphicsInfo.setDebugOptions(). Stores options on a per component basis.


getDebugOptions

static int getDebugOptions(JComponent component)
Static wrapper method for DebugGraphicsInfo.getDebugOptions().


shouldComponentDebug

static int shouldComponentDebug(JComponent component)
Returns non-zero if component should display with DebugGraphics, zero otherwise. Walks the JComponent's parent tree to determine if any debugging options have been set.


debugComponentCount

static int debugComponentCount()
Returns the number of JComponents that have debugging options turned on.


debugLog

boolean debugLog()

debugFlash

boolean debugFlash()

debugBuffered

boolean debugBuffered()

debugGraphics

private Graphics debugGraphics()
Returns a DebugGraphics for use in buffering window.


info

static DebugGraphicsInfo info()
Returns DebugGraphicsInfo, or creates one if none exists.



comments?