Java Doc for DebugGraphics.java in  » 6.0-JDK-Core » swing » javax » swing » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » swing » javax.swing 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.awt.Graphics
      javax.swing.DebugGraphics

DebugGraphics
public class DebugGraphics extends Graphics (Code)
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);
See Also:   JComponent.setDebugGraphicsOptions
See Also:   RepaintManager.currentManager
See Also:   RepaintManager.setDoubleBufferingEnabled
version:
   1.33 05/05/07
author:
   Dave Karlton



Field Summary
final public static  intBUFFERED_OPTION
     Show buffered operations in a separate Frame.
final public static  intFLASH_OPTION
     Flash graphics operations.
final public static  intLOG_OPTION
     Log graphics operations.
final public static  intNONE_OPTION
     Don't debug graphics operations.
 Imagebuffer
    
 intdebugOptions
    
 Graphicsgraphics
    
 intgraphicsID
    
 intxOffsetyOffset
    

Constructor Summary
public  DebugGraphics()
     Constructs a new debug graphics context that supports slowed down drawing.
public  DebugGraphics(Graphics graphics, JComponent component)
     Constructs a debug graphics context from an existing graphics context that slows down drawing for the specified component.
public  DebugGraphics(Graphics graphics)
     Constructs a debug graphics context from an existing graphics context that supports slowed down drawing.

Method Summary
public  voidclearRect(int x, int y, int width, int height)
     Overrides Graphics.clearRect.
public  voidclipRect(int x, int y, int width, int height)
     Overrides Graphics.clipRect.
public  voidcopyArea(int x, int y, int width, int height, int destX, int destY)
     Overrides Graphics.copyArea.
public  Graphicscreate()
     Overrides Graphics.create to return a DebugGraphics object.
public  Graphicscreate(int x, int y, int width, int height)
     Overrides Graphics.create to return a DebugGraphics object.
 booleandebugBuffered()
    
static  intdebugComponentCount()
     Returns the number of JComponents that have debugging options turned on.
 booleandebugFlash()
    
 booleandebugLog()
    
public  voiddispose()
     Overrides Graphics.dispose.
public  voiddraw3DRect(int x, int y, int width, int height, boolean raised)
     Overrides Graphics.draw3DRect.
public  voiddrawArc(int x, int y, int width, int height, int startAngle, int arcAngle)
     Overrides Graphics.drawArc.
public  voiddrawBytes(byte data, int offset, int length, int x, int y)
     Overrides Graphics.drawBytes.
public  voiddrawChars(char data, int offset, int length, int x, int y)
     Overrides Graphics.drawChars.
public  booleandrawImage(Image img, int x, int y, ImageObserver observer)
     Overrides Graphics.drawImage.
public  booleandrawImage(Image img, int x, int y, int width, int height, ImageObserver observer)
     Overrides Graphics.drawImage.
public  booleandrawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)
     Overrides Graphics.drawImage.
public  booleandrawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)
     Overrides Graphics.drawImage.
public  booleandrawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)
     Overrides Graphics.drawImage.
public  booleandrawImage(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  voiddrawLine(int x1, int y1, int x2, int y2)
     Overrides Graphics.drawLine.
public  voiddrawOval(int x, int y, int width, int height)
     Overrides Graphics.drawOval.
public  voiddrawPolygon(int xPoints, int yPoints, int nPoints)
     Overrides Graphics.drawPolygon.
public  voiddrawPolyline(int xPoints, int yPoints, int nPoints)
     Overrides Graphics.drawPolyline.
public  voiddrawRect(int x, int y, int width, int height)
     Overrides Graphics.drawRect.
public  voiddrawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
     Overrides Graphics.drawRoundRect.
public  voiddrawString(String aString, int x, int y)
     Overrides Graphics.drawString.
public  voiddrawString(AttributedCharacterIterator iterator, int x, int y)
     Overrides Graphics.drawString.
public  voidfill3DRect(int x, int y, int width, int height, boolean raised)
     Overrides Graphics.fill3DRect.
public  voidfillArc(int x, int y, int width, int height, int startAngle, int arcAngle)
     Overrides Graphics.fillArc.
public  voidfillOval(int x, int y, int width, int height)
     Overrides Graphics.fillOval.
public  voidfillPolygon(int xPoints, int yPoints, int nPoints)
     Overrides Graphics.fillPolygon.
public  voidfillRect(int x, int y, int width, int height)
     Overrides Graphics.fillRect.
public  voidfillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)
     Overrides Graphics.fillRoundRect.
public static  ColorflashColor()
     Returns the Color used to flash drawing operations.
public static  intflashCount()
     Returns the number of times that drawing operations will flash.
public static  intflashTime()
     Returns the time delay of drawing operation flashing.
public  ShapegetClip()
     Overrides Graphics.getClip.
public  RectanglegetClipBounds()
     Overrides Graphics.getClipBounds.
public  ColorgetColor()
     Returns the Color used for text drawing operations.
public  intgetDebugOptions()
     Returns the current debugging options for this DebugGraphics.
static  intgetDebugOptions(JComponent component)
     Static wrapper method for DebugGraphicsInfo.getDebugOptions().
public  FontgetFont()
     Returns the Font used for text drawing operations.
public  FontMetricsgetFontMetrics()
     Overrides Graphics.getFontMetrics.
public  FontMetricsgetFontMetrics(Font f)
     Overrides Graphics.getFontMetrics.
static  DebugGraphicsInfoinfo()
     Returns DebugGraphicsInfo, or creates one if none exists.
public  booleanisDrawingBuffer()
     Returns the drawingBuffer value.
static  voidloadImage(Image img)
    
public static  java.io.PrintStreamlogStream()
     Returns the stream to which the DebugGraphics logs drawing operations.
 StringpointToString(int x, int y)
    
public  voidsetClip(int x, int y, int width, int height)
     Overrides Graphics.setClip.
public  voidsetClip(Shape clip)
     Overrides Graphics.setClip.
public  voidsetColor(Color aColor)
     Sets the color to be used for drawing and filling lines and shapes.
public  voidsetDebugOptions(int options)
     Enables/disables diagnostic information about every graphics operation.
static  voidsetDebugOptions(JComponent component, int options)
     Static wrapper method for DebugGraphicsInfo.setDebugOptions().
public static  voidsetFlashColor(Color flashColor)
     Sets the Color used to flash drawing operations.
public static  voidsetFlashCount(int flashCount)
     Sets the number of times that drawing operations will flash.
public static  voidsetFlashTime(int flashTime)
     Sets the time delay of drawing operation flashing.
public  voidsetFont(Font aFont)
     Sets the Font used for text drawing operations.
public static  voidsetLogStream(java.io.PrintStream stream)
     Sets the stream to which the DebugGraphics logs drawing operations.
public  voidsetPaintMode()
     Overrides Graphics.setPaintMode.
public  voidsetXORMode(Color aColor)
     Overrides Graphics.setXORMode.
static  intshouldComponentDebug(JComponent component)
     Returns non-zero if component should display with DebugGraphics, zero otherwise.
final  voidsleep(int mSecs)
    
 StringtoShortString()
    
public  voidtranslate(int x, int y)
     Overrides Graphics.translate.

Field Detail
BUFFERED_OPTION
final public static int BUFFERED_OPTION(Code)
Show buffered operations in a separate Frame.



FLASH_OPTION
final public static int FLASH_OPTION(Code)
Flash graphics operations.



LOG_OPTION
final public static int LOG_OPTION(Code)
Log graphics operations.



NONE_OPTION
final public static int NONE_OPTION(Code)
Don't debug graphics operations.



buffer
Image buffer(Code)



debugOptions
int debugOptions(Code)



graphics
Graphics graphics(Code)



graphicsID
int graphicsID(Code)



xOffsetyOffset
int xOffsetyOffset(Code)




Constructor Detail
DebugGraphics
public DebugGraphics()(Code)
Constructs a new debug graphics context that supports slowed down drawing.



DebugGraphics
public DebugGraphics(Graphics graphics, JComponent component)(Code)
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
Parameters:
  component - the JComponent to draw slowly



DebugGraphics
public DebugGraphics(Graphics graphics)(Code)
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
clearRect
public void clearRect(int x, int y, int width, int height)(Code)
Overrides Graphics.clearRect.



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



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



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



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



debugBuffered
boolean debugBuffered()(Code)



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



debugFlash
boolean debugFlash()(Code)



debugLog
boolean debugLog()(Code)



dispose
public void dispose()(Code)
Overrides Graphics.dispose.



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



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



drawBytes
public void drawBytes(byte data, int offset, int length, int x, int y)(Code)
Overrides Graphics.drawBytes.



drawChars
public void drawChars(char data, int offset, int length, int x, int y)(Code)
Overrides Graphics.drawChars.



drawImage
public boolean drawImage(Image img, int x, int y, ImageObserver observer)(Code)
Overrides Graphics.drawImage.



drawImage
public boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)(Code)
Overrides Graphics.drawImage.



drawImage
public boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)(Code)
Overrides Graphics.drawImage.



drawImage
public boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)(Code)
Overrides Graphics.drawImage.



drawImage
public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)(Code)
Overrides Graphics.drawImage.



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)(Code)
Overrides Graphics.drawImage.



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



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



drawPolygon
public void drawPolygon(int xPoints, int yPoints, int nPoints)(Code)
Overrides Graphics.drawPolygon.



drawPolyline
public void drawPolyline(int xPoints, int yPoints, int nPoints)(Code)
Overrides Graphics.drawPolyline.



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



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



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



drawString
public void drawString(AttributedCharacterIterator iterator, int x, int y)(Code)
Overrides Graphics.drawString.



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



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



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



fillPolygon
public void fillPolygon(int xPoints, int yPoints, int nPoints)(Code)
Overrides Graphics.fillPolygon.



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



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



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



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



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



getClip
public Shape getClip()(Code)
Overrides Graphics.getClip.



getClipBounds
public Rectangle getClipBounds()(Code)
Overrides Graphics.getClipBounds.



getColor
public Color getColor()(Code)
Returns the Color used for text drawing operations.
See Also:   DebugGraphics.setColor



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



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



getFont
public Font getFont()(Code)
Returns the Font used for text drawing operations.
See Also:   DebugGraphics.setFont



getFontMetrics
public FontMetrics getFontMetrics()(Code)
Overrides Graphics.getFontMetrics.



getFontMetrics
public FontMetrics getFontMetrics(Font f)(Code)
Overrides Graphics.getFontMetrics.



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



isDrawingBuffer
public boolean isDrawingBuffer()(Code)
Returns the drawingBuffer value. true if this object is drawing from a Buffer



loadImage
static void loadImage(Image img)(Code)



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



pointToString
String pointToString(int x, int y)(Code)



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



setClip
public void setClip(Shape clip)(Code)
Overrides Graphics.setClip.



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



setDebugOptions
public void setDebugOptions(int options)(Code)
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.



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



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



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



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



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



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



setPaintMode
public void setPaintMode()(Code)
Overrides Graphics.setPaintMode.



setXORMode
public void setXORMode(Color aColor)(Code)
Overrides Graphics.setXORMode.



shouldComponentDebug
static int shouldComponentDebug(JComponent component)(Code)
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.



sleep
final void sleep(int mSecs)(Code)



toShortString
String toShortString()(Code)



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



Methods inherited from java.awt.Graphics
abstract public void clearRect(int x, int y, int width, int height)(Code)(Java Doc)
abstract public void clipRect(int x, int y, int width, int height)(Code)(Java Doc)
abstract public void copyArea(int x, int y, int width, int height, int dx, int dy)(Code)(Java Doc)
abstract public Graphics create()(Code)(Java Doc)
public Graphics create(int x, int y, int width, int height)(Code)(Java Doc)
abstract public void dispose()(Code)(Java Doc)
public void draw3DRect(int x, int y, int width, int height, boolean raised)(Code)(Java Doc)
abstract public void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle)(Code)(Java Doc)
public void drawBytes(byte data, int offset, int length, int x, int y)(Code)(Java Doc)
public void drawChars(char data, int offset, int length, int x, int y)(Code)(Java Doc)
abstract public boolean drawImage(Image img, int x, int y, ImageObserver observer)(Code)(Java Doc)
abstract public boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer)(Code)(Java Doc)
abstract public boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer)(Code)(Java Doc)
abstract public boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer)(Code)(Java Doc)
abstract public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, ImageObserver observer)(Code)(Java Doc)
abstract 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)(Code)(Java Doc)
abstract public void drawLine(int x1, int y1, int x2, int y2)(Code)(Java Doc)
abstract public void drawOval(int x, int y, int width, int height)(Code)(Java Doc)
abstract public void drawPolygon(int xPoints, int yPoints, int nPoints)(Code)(Java Doc)
public void drawPolygon(Polygon p)(Code)(Java Doc)
abstract public void drawPolyline(int xPoints, int yPoints, int nPoints)(Code)(Java Doc)
public void drawRect(int x, int y, int width, int height)(Code)(Java Doc)
abstract public void drawRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)(Code)(Java Doc)
abstract public void drawString(String str, int x, int y)(Code)(Java Doc)
abstract public void drawString(AttributedCharacterIterator iterator, int x, int y)(Code)(Java Doc)
public void fill3DRect(int x, int y, int width, int height, boolean raised)(Code)(Java Doc)
abstract public void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle)(Code)(Java Doc)
abstract public void fillOval(int x, int y, int width, int height)(Code)(Java Doc)
abstract public void fillPolygon(int xPoints, int yPoints, int nPoints)(Code)(Java Doc)
public void fillPolygon(Polygon p)(Code)(Java Doc)
abstract public void fillRect(int x, int y, int width, int height)(Code)(Java Doc)
abstract public void fillRoundRect(int x, int y, int width, int height, int arcWidth, int arcHeight)(Code)(Java Doc)
public void finalize()(Code)(Java Doc)
abstract public Shape getClip()(Code)(Java Doc)
abstract public Rectangle getClipBounds()(Code)(Java Doc)
public Rectangle getClipBounds(Rectangle r)(Code)(Java Doc)
public Rectangle getClipRect()(Code)(Java Doc)
abstract public Color getColor()(Code)(Java Doc)
abstract public Font getFont()(Code)(Java Doc)
public FontMetrics getFontMetrics()(Code)(Java Doc)
abstract public FontMetrics getFontMetrics(Font f)(Code)(Java Doc)
public boolean hitClip(int x, int y, int width, int height)(Code)(Java Doc)
abstract public void setClip(int x, int y, int width, int height)(Code)(Java Doc)
abstract public void setClip(Shape clip)(Code)(Java Doc)
abstract public void setColor(Color c)(Code)(Java Doc)
abstract public void setFont(Font font)(Code)(Java Doc)
abstract public void setPaintMode()(Code)(Java Doc)
abstract public void setXORMode(Color c1)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
abstract public void translate(int x, int y)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.