/** Overrides <code>Graphics.create</code> to return a DebugGraphics object. */ public Graphics create() { DebugGraphics debugGraphics; debugGraphics = new DebugGraphics(); debugGraphics.graphics = graphics.create(); debugGraphics.debugOptions = debugOptions; debugGraphics.buffer = buffer; return debugGraphics; }
/** Overrides <code>Graphics.create</code> to return a DebugGraphics object. */ public Graphics create(int x, int y, int width, int height) { DebugGraphics debugGraphics; debugGraphics = new DebugGraphics(); debugGraphics.graphics = graphics.create(x, y, width, height); debugGraphics.debugOptions = debugOptions; debugGraphics.buffer = buffer; debugGraphics.xOffset = xOffset + x; debugGraphics.yOffset = yOffset + y; return debugGraphics; }
/** Returns a DebugGraphics for use in buffering window. */ private Graphics debugGraphics() { DebugGraphics debugGraphics; DebugGraphicsInfo info = info(); JFrame debugFrame; if (info.debugFrame == null) { info.debugFrame = new JFrame(); info.debugFrame.setSize(500, 500); } debugFrame = info.debugFrame; debugFrame.show(); debugGraphics = new DebugGraphics(debugFrame.getGraphics()); debugGraphics.setFont(getFont()); debugGraphics.setColor(getColor()); debugGraphics.translate(xOffset, yOffset); debugGraphics.setClip(getClipBounds()); if (debugFlash()) { debugGraphics.setDebugOptions(FLASH_OPTION); } return debugGraphics; }