| public class javax.swing DebugGraphics
|
Java SE 6 |
NOTE: You must turn off double buffering to use DebugGraphics: RepaintManager repaintManager = RepaintManager.currentManager(component); repaintManager.setDoubleBufferingEnabled(false);
| version | 1.27 11/17/05 |
| See also | setDebugGraphicsOptions, currentManager, setDoubleBufferingEnabled |
| Fields | |
|---|---|
| final public static int | LOG_OPTION Log graphics operations. |
| final public static int | FLASH_OPTION Flash graphics operations. |
| final public static int | BUFFERED_OPTION Show buffered operations in a separate Frame.
|
| final public static int | NONE_OPTION Don't debug graphics operations. |
| Constructors | |||||
|---|---|---|---|---|---|
| public | DebugGraphics() Constructs a new debug graphics context that supports slowed down drawing. | ||||
| public | DebugGraphics(Graphics graphics, JComponent component) Details
Constructs a debug graphics context from an existing graphics
context that slows down drawing for the specified component.
| ||||
| public | DebugGraphics(Graphics graphics) Details
Constructs a debug graphics context from an existing graphics
context that supports slowed down drawing.
| ||||
| Methods | |||
|---|---|---|---|
| public void | clearRect(int x, int y, int width, int height) Overrides Graphics.clearRect.
| ||
| public void | clipRect(int x, int y, int width, int height) Overrides Graphics.clipRect.
| ||
| public void | copyArea(int x, int y, int width, int height, int destX, int destY) Overrides Graphics.copyArea.
| ||
| public Graphics | create() Overrides Graphics.create to return a DebugGraphics object.
| ||
| public Graphics | create(int x, int y, int width, int height) Overrides Graphics.create to return a DebugGraphics object.
| ||
| public void | dispose() Overrides Graphics.dispose.
| ||
| public void | draw3DRect(int x, int y, int width, int height, boolean raised) Overrides Graphics.draw3DRect.
| ||
| public void | drawArc(int x, int y, int width, int height, int startAngle, int arcAngle) Overrides Graphics.drawArc.
| ||
| public void | drawBytes(byte[] data, int offset, int length, int x, int y) Overrides Graphics.drawBytes.
| ||
| public void | drawChars(char[] data, int offset, int length, int x, int y) Overrides Graphics.drawChars.
| ||
| public boolean | drawImage(Image img, int x, int y, ImageObserver observer) Overrides Graphics.drawImage.
| ||
| public boolean | drawImage(Image img, int x, int y, int width, int height, ImageObserver observer) Overrides Graphics.drawImage.
| ||
| public boolean | drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer) Overrides Graphics.drawImage.
| ||
| public boolean | drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer) Overrides 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 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 Graphics.drawImage.
| ||
| public void | drawLine(int x1, int y1, int x2, int y2) Overrides Graphics.drawLine.
| ||
| public void | drawOval(int x, int y, int width, int height) Overrides Graphics.drawOval.
| ||
| public void | drawPolygon(int[] xPoints, int[] yPoints, int nPoints) Overrides Graphics.drawPolygon.
| ||
| public void | drawPolyline(int[] xPoints, int[] yPoints, int nPoints) Overrides Graphics.drawPolyline.
| ||
| public void | drawRect(int x, int y, int width, int height) Overrides Graphics.drawRect.
| ||
| public void | drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) Overrides Graphics.drawRoundRect.
| ||
| public void | drawString(String aString, int x, int y) Overrides Graphics.drawString.
| ||
| public void | drawString(AttributedCharacterIterator iterator, int x, int y) Overrides Graphics.drawString.
| ||
| public void | fill3DRect(int x, int y, int width, int height, boolean raised) Overrides Graphics.fill3DRect.
| ||
| public void | fillArc(int x, int y, int width, int height, int startAngle, int arcAngle) Overrides Graphics.fillArc.
| ||
| public void | fillOval(int x, int y, int width, int height) Overrides Graphics.fillOval.
| ||
| public void | fillPolygon(int[] xPoints, int[] yPoints, int nPoints) Overrides Graphics.fillPolygon.
| ||
| public void | fillRect(int x, int y, int width, int height) Overrides Graphics.fillRect.
| ||
| public void | fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight) Overrides Graphics.fillRoundRect.
| ||
| public static Color | flashColor() Details
Returns the Color used to flash drawing operations.
| ||
| public static int | flashCount() Details
Returns the number of times that drawing operations will flash.
| ||
| public static int | flashTime() Details
Returns the time delay of drawing operation flashing.
| ||
| public static PrintStream | logStream() Details
Returns the stream to which the DebugGraphics logs drawing operations.
| ||
| public void | translate(int x, int y) Overrides Graphics.translate.
| ||
| Properties | |||
|---|---|---|---|
| public void | setClip(int x, int y, int width, int height) Overrides Graphics.setClip.
| ||
| public void | setClip(Shape clip) Overrides Graphics.setClip.
| ||
| public Shape | getClip() Overrides Graphics.getClip.
| ||
| public Rectangle | getClipBounds() Overrides Graphics.getClipBounds.
| ||
| public void | setColor(Color aColor) Sets the color to be used for drawing and filling lines and shapes. | ||
| public Color | getColor() Details
Returns the Color used for text drawing operations.
| ||
| 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. | ||
| public int | getDebugOptions() Details
Returns the current debugging options for this DebugGraphics.
| ||
| public boolean | isDrawingBuffer() Details
Returns the drawingBuffer value.
| ||
| public static void | setFlashColor(Color flashColor) Sets the Color used to flash drawing operations. | ||
| public static void | setFlashCount(int flashCount) Sets the number of times that drawing operations will flash. | ||
| public static void | setFlashTime(int flashTime) Sets the time delay of drawing operation flashing. | ||
| public void | setFont(Font aFont) Sets the Font used for text drawing operations. | ||
| public Font | getFont() Details
Returns the Font used for text drawing operations.
| ||
| public FontMetrics | getFontMetrics() Overrides Graphics.getFontMetrics.
| ||
| public FontMetrics | getFontMetrics(Font f) Overrides Graphics.getFontMetrics.
| ||
| public static void | setLogStream(PrintStream stream) Sets the stream to which the DebugGraphics logs drawing operations. | ||
| public void | setPaintMode() Overrides Graphics.setPaintMode.
| ||
| public void | setXORMode(Color aColor) Overrides Graphics.setXORMode.
| ||
| About DocWeb · Bundles · Export · Export All | Top 10 · Statistics · Login |
| About Sun · Contact · Privacy · Terms of Use · Trademarks | Java SE 6 · Copyright © 1994-2009 Sun Microsystems, Inc.All rights reserved. Use is subject to license terms |
![]() |
![]() |
|