|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
java.awt.Graphics
![]()
![]()
![]()
javax.swing.DebugGraphics
public class DebugGraphics

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);
JComponent.setDebugGraphicsOptions(int)
,
RepaintManager.currentManager(java.awt.Component)
,
RepaintManager.setDoubleBufferingEnabled(boolean)

| Field Summary | |
|---|---|
static int |
BUFFERED_OPTION
Show buffered operations in a separate 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
Constructs a new debug graphics context that supports slowed down drawing. |
|
DebugGraphics
Constructs a debug graphics context from an existing graphics context that supports slowed down drawing. |
|
DebugGraphics
Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component. |
|
| Method Summary | |
|---|---|
void |
clearRect
Overrides Graphics.clearRect. |
void |
clipRect
Overrides Graphics.clipRect. |
void |
copyArea
Overrides Graphics.copyArea. |
Graphics |
create
Overrides Graphics.create to return a DebugGraphics object. |
Graphics |
create
Overrides Graphics.create to return a DebugGraphics object. |
void |
dispose
Overrides Graphics.dispose. |
void |
draw3DRect
Overrides Graphics.draw3DRect. |
void |
drawArc
Overrides Graphics.drawArc. |
void |
drawBytes
Overrides Graphics.drawBytes. |
void |
drawChars
Overrides Graphics.drawChars. |
boolean |
drawImage
Overrides Graphics.drawImage. |
boolean |
drawImage
Overrides Graphics.drawImage. |
boolean |
drawImage
Overrides Graphics.drawImage. |
boolean |
drawImage
Overrides Graphics.drawImage. |
boolean |
drawImage
Overrides Graphics.drawImage. |
boolean |
drawImage
Overrides Graphics.drawImage. |
void |
drawLine
Overrides Graphics.drawLine. |
void |
drawOval
Overrides Graphics.drawOval. |
void |
drawPolygon
Overrides Graphics.drawPolygon. |
void |
drawPolyline
Overrides Graphics.drawPolyline. |
void |
drawRect
Overrides Graphics.drawRect. |
void |
drawRoundRect
Overrides Graphics.drawRoundRect. |
void |
drawString
Overrides Graphics.drawString. |
void |
drawString
Overrides Graphics.drawString. |
void |
fill3DRect
Overrides Graphics.fill3DRect. |
void |
fillArc
Overrides Graphics.fillArc. |
void |
fillOval
Overrides Graphics.fillOval. |
void |
fillPolygon
Overrides Graphics.fillPolygon. |
void |
fillRect
Overrides Graphics.fillRect. |
void |
fillRoundRect
Overrides Graphics.fillRoundRect. |
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
Overrides Graphics.getClip. |
Rectangle |
getClipBounds
Overrides Graphics.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
Overrides Graphics.getFontMetrics. |
FontMetrics |
getFontMetrics
Overrides Graphics.getFontMetrics. |
boolean |
isDrawingBuffer
Returns the drawingBuffer value. |
static PrintStream |
logStream
Returns the stream to which the DebugGraphics logs drawing operations. |
void |
setClip
Overrides Graphics.setClip. |
void |
setClip
Overrides Graphics.setClip. |
void |
setColor
Sets the color to be used for drawing and filling lines and shapes. |
void |
setDebugOptions
Enables/disables diagnostic information about every graphics operation. |
static void |
setFlashColor
Sets the Color used to flash drawing operations. |
static void |
setFlashCount
Sets the number of times that drawing operations will flash. |
static void |
setFlashTime
Sets the time delay of drawing operation flashing. |
void |
setFont
Sets the Font used for text drawing operations. |
static void |
setLogStream
Sets the stream to which the DebugGraphics logs drawing operations. |
void |
setPaintMode
Overrides Graphics.setPaintMode. |
void |
setXORMode
Overrides Graphics.setXORMode. |
void |
translate
Overrides Graphics.translate. |
Methods inherited from class java.awt.Graphics ![]() |
|---|
drawPolygon |
Methods inherited from class java.lang.Object ![]() |
|---|
clone |
| Field Detail |
|---|

public static final int LOG_OPTION

public static final int FLASH_OPTION

public static final int BUFFERED_OPTION
Frame.

public static final int NONE_OPTION
| Constructor Detail |
|---|

public DebugGraphics()

public DebugGraphics(Graphics![]()
![]()
graphics, JComponent
![]()
![]()
component)
graphics - the Graphics context to slow downcomponent - the JComponent to draw slowly

public DebugGraphics(Graphics![]()
![]()
graphics)
graphics - the Graphics context to slow down| Method Detail |
|---|

public Graphics![]()
![]()
create()
Graphics.create to return a DebugGraphics object.
create

in class Graphics


public Graphics![]()
![]()
create(int x, int y, int width, int height)
Graphics.create to return a DebugGraphics object.
create

in class Graphics

x - the x coordinate.y - the y coordinate.width - the width of the clipping rectangle.height - the height of the clipping rectangle.
Graphics.translate(int, int)
,
Graphics.clipRect(int, int, int, int)


public static void setFlashColor(Color![]()
![]()
flashColor)

public static Color![]()
![]()
flashColor()
setFlashColor(java.awt.Color)
