javax.swing
public class DebugGraphics extends Graphics
DebugGraphics
has the ability to
draw slowly and can log drawing actions.
Field Summary | |
---|---|
static int | BUFFERED_OPTION
BUFFERED_OPTION |
static int | FLASH_OPTION
FLASH_OPTION |
static int | LOG_OPTION
LOG_OPTION |
static int | NONE_OPTION
NONE_OPTION |
Constructor Summary | |
---|---|
DebugGraphics()
Creates a DebugGraphics object. | |
DebugGraphics(Graphics graphics, JComponent component)
Creates a DebugGraphics object.
| |
DebugGraphics(Graphics graphics)
Creates a DebugGraphics object.
|
Method Summary | |
---|---|
void | clearRect(int x, int y, int width, int height)
clearRect
|
void | clipRect(int x, int y, int width, int height)
Intersects the current clip region with the given region.
|
void | copyArea(int x, int y, int width, int height, int destx, int desty)
copyArea
|
Graphics | create()
Creates a overrides Graphics.create to create a
DebugGraphics object.
|
Graphics | create(int x, int y, int width, int height)
Creates a overrides Graphics.create to create a
DebugGraphics object.
|
void | dispose()
Releases all system resources that this Graphics is using. |
void | draw3DRect(int x, int y, int width, int height, boolean raised)
draw3DRect
|
void | drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
drawArc
|
void | drawBytes(byte[] data, int offset, int length, int x, int y)
drawBytes
|
void | drawChars(char[] data, int offset, int length, int x, int y)
drawChars
|
boolean | drawImage(Image image, int x, int y, ImageObserver observer)
drawImage
|
boolean | drawImage(Image image, int x, int y, int width, int height, ImageObserver observer)
drawImage
|
boolean | drawImage(Image image, int x, int y, Color background, ImageObserver observer)
drawImage
|
boolean | drawImage(Image image, int x, int y, int width, int height, Color background, ImageObserver observer)
drawImage
|
boolean | drawImage(Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
drawImage
|
boolean | drawImage(Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, Color background, ImageObserver observer)
drawImage
|
void | drawLine(int x1, int y1, int x2, int y2)
drawLine
|
void | drawOval(int x, int y, int width, int height)
drawOval
|
void | drawPolygon(int[] xpoints, int[] ypoints, int npoints)
drawPolygon
|
void | drawPolyline(int[] xpoints, int[] ypoints, int npoints)
drawPolyline
|
void | drawRect(int x, int y, int width, int height)
Draws a rectangle.
|
void | drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
drawRoundRect
|
void | drawString(String string, int x, int y)
drawString
|
void | drawString(AttributedCharacterIterator iterator, int x, int y)
drawString
|
void | fill3DRect(int x, int y, int width, int height, boolean raised)
fill3DRect
|
void | fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
fillArc
|
void | fillOval(int x, int y, int width, int height)
fillOval
|
void | fillPolygon(int[] xpoints, int[] ypoints, int npoints)
fillPolygon
|
void | fillRect(int x, int y, int width, int height)
Draws a filled rectangle.
|
void | fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
fillRoundRect
|
static Color | flashColor()
flashColor
|
static int | flashCount()
flashCount
|
static int | flashTime()
flashTime
|
Shape | getClip()
Returns the current clipping region.
|
Rectangle | getClipBounds()
getClipBounds
|
Color | getColor()
Returns the color used for drawing.
|
int | getDebugOptions()
getDebugOptions
|
Font | getFont()
getFont
|
FontMetrics | getFontMetrics()
Returns the font metrics of the current font.
|
FontMetrics | getFontMetrics(Font font)
Returns the font metrics for a given font.
|
boolean | isDrawingBuffer()
isDrawingBuffer
|
static PrintStream | logStream()
logStream
|
void | setClip(int x, int y, int width, int height)
Sets the clipping region.
|
void | setClip(Shape shape)
Sets the current clipping region
|
void | setColor(Color color)
Sets the color to draw stuff with.
|
void | setDebugOptions(int options)
setDebugOptions
|
static void | setFlashColor(Color color)
setFlashColor
|
static void | setFlashCount(int count)
setFlashCount
|
static void | setFlashTime(int time)
setFlashTime
|
void | setFont(Font font)
setFont
|
static void | setLogStream(PrintStream stream)
setLogStream
|
void | setPaintMode()
setPaintMode |
void | setXORMode(Color color)
setXORMode
|
void | translate(int x, int y)
translate
|
DebugGraphics
object.DebugGraphics
object.
Parameters: graphics The Graphics
object to wrap component TODO
DebugGraphics
object.
Parameters: graphics The Graphics
object to wrap
Parameters: x The x-position of the rectangle y The y-position of the rectangle width The width of the rectangle height The height of the rectangle
Parameters: x The x-position of the region y The y-position of the region width The width of the region height The height of the region
Parameters: x The x position of the source area y The y position of the source area width The width of the area height The height of the area destx The x position of the destination area desty The y posiiton of the destination area
Graphics.create
to create a
DebugGraphics
object.
Returns: a new DebugGraphics
object.
Graphics.create
to create a
DebugGraphics
object.
Parameters: x the x coordinate y the y coordinate width the width height the height
Returns: a new DebugGraphics
object.
Graphics
is using.Parameters: x The x-position of the rectangle y The y-position of the rectangle width The width of the rectangle height The height of the rectangle raised TODO
Parameters: x the x coordinate y the y coordinate width the width height the height startAngle TODO arcAngle TODO
Parameters: data TODO offset TODO length TODO x the x coordinate y the y coordinate
Parameters: data array of characters to draw offset offset in array length number of characters in array to draw x x-position y y-position
Parameters: image The image to draw x The x position y The y position observer The image observer
Returns: boolean
Parameters: image The image to draw x The x position y The y position width The width of the area to draw the image height The height of the area to draw the image observer The image observer
Returns: boolean
Parameters: image The image to draw x The x position y The y position background The color for the background in the opaque regions of the image observer The image observer
Returns: boolean
Parameters: image The image to draw x The x position y The y position width The width of the area to draw the image height The height of the area to draw the image background The color for the background in the opaque regions of the image observer The image observer
Returns: boolean
Parameters: image The image to draw dx1 TODO dy1 TODO dx2 TODO dy2 TODO sx1 TODO sy1 TODO sx2 TODO sy2 TODO observer The image observer
Returns: boolean
Parameters: image The image to draw dx1 TODO dy1 TODO dx2 TODO dy2 TODO sx1 TODO sy1 TODO sx2 TODO sy2 TODO background The color for the background in the opaque regions of the image observer The image observer
Returns: boolean
Parameters: x1 The x-position of the start y1 The y-position of the start x2 The x-position of the end y2 The y-position of the end
Parameters: x the x coordinate y the y coordiante width the width height the height
Parameters: xpoints TODO ypoints TODO npoints TODO
Parameters: xpoints TODO ypoints TODO npoints TODO
Parameters: x The x-position of the rectangle y The y-position of the rectangle width The width of the rectangle height The height of the rectangle
Parameters: x The x-position of the rectangle y The y-position of the rectangle width The width of the rectangle height The height of the rectangle arcWidth TODO arcHeight TODO
Parameters: string the string x the x coordinate y the y coordinate
Parameters: iterator TODO x the x coordinate y the y coordinate
Parameters: x The x-position of the rectangle y The y-position of the rectangle width The width of the rectangle height The height of the rectangle raised TODO
Parameters: x the coordinate y the y coordinate width the width height the height startAngle TODO arcAngle TODO
Parameters: x the x coordinate y the y coordinate width the width height the height
Parameters: xpoints TODO ypoints TODO npoints TODO
Parameters: x The x-position of the rectangle y The y-position of the rectangle width The width of the rectangle height The height of the rectangle
Parameters: x The x-position of the rectangle y The y-position of the rectangle width The width of the rectangle height The height of the rectangle arcWidth TODO arcHeight TODO
Returns: Color
Returns: The number of flashes
Returns: The time in milliseconds
Returns: Shape
Returns: Rectangle
Returns: The color.
Returns: the debug options
Returns: The font
Returns: a FontMetrics
object
Parameters: font the font to get the metrics for
Returns: a FontMetrics
object
Returns: boolean
Returns: The PrintStream
to write logging messages to
Parameters: x The x-position of the region y The y-position of the region width The width of the region height The height of the region
Parameters: shape The clippin region
Parameters: color The color
Parameters: options the debug options
Parameters: color the color to use for flashing
Parameters: count The number of flashes
Parameters: time The time in milliseconds
Parameters: font The font to use for drawing text
Parameters: stream The currently set PrintStream
.
Parameters: color the color
Parameters: x the x coordinate y the y coordinate