1436 return debugGraphicsInfo.componentToDebug.size();
1437 } else {
1438 return 0;
1439 }
1440 }
1441
1442 boolean debugLog() {
1443 return (debugOptions & LOG_OPTION) == LOG_OPTION;
1444 }
1445
1446 boolean debugFlash() {
1447 return (debugOptions & FLASH_OPTION) == FLASH_OPTION;
1448 }
1449
1450 boolean debugBuffered() {
1451 return (debugOptions & BUFFERED_OPTION) == BUFFERED_OPTION;
1452 }
1453
1454 /** Returns a DebugGraphics for use in buffering window.
1455 */
1456 private Graphics debugGraphics() {
1457 DebugGraphics debugGraphics;
1458 DebugGraphicsInfo info = info();
1459 JFrame debugFrame;
1460
1461 if (info.debugFrame == null) {
1462 info.debugFrame = new JFrame();
1463 info.debugFrame.setSize(500, 500);
1464 }
1465 debugFrame = info.debugFrame;
1466 debugFrame.show();
1467 debugGraphics = new DebugGraphics(debugFrame.getGraphics());
1468 debugGraphics.setFont(getFont());
1469 debugGraphics.setColor(getColor());
1470 debugGraphics.translate(xOffset, yOffset);
1471 debugGraphics.setClip(getClipBounds());
1472 if (debugFlash()) {
1473 debugGraphics.setDebugOptions(FLASH_OPTION);
1474 }
1475 return debugGraphics;
|
1436 return debugGraphicsInfo.componentToDebug.size();
1437 } else {
1438 return 0;
1439 }
1440 }
1441
1442 boolean debugLog() {
1443 return (debugOptions & LOG_OPTION) == LOG_OPTION;
1444 }
1445
1446 boolean debugFlash() {
1447 return (debugOptions & FLASH_OPTION) == FLASH_OPTION;
1448 }
1449
1450 boolean debugBuffered() {
1451 return (debugOptions & BUFFERED_OPTION) == BUFFERED_OPTION;
1452 }
1453
1454 /** Returns a DebugGraphics for use in buffering window.
1455 */
1456 @SuppressWarnings("deprecation")
1457 private Graphics debugGraphics() {
1458 DebugGraphics debugGraphics;
1459 DebugGraphicsInfo info = info();
1460 JFrame debugFrame;
1461
1462 if (info.debugFrame == null) {
1463 info.debugFrame = new JFrame();
1464 info.debugFrame.setSize(500, 500);
1465 }
1466 debugFrame = info.debugFrame;
1467 debugFrame.show();
1468 debugGraphics = new DebugGraphics(debugFrame.getGraphics());
1469 debugGraphics.setFont(getFont());
1470 debugGraphics.setColor(getColor());
1471 debugGraphics.translate(xOffset, yOffset);
1472 debugGraphics.setClip(getClipBounds());
1473 if (debugFlash()) {
1474 debugGraphics.setDebugOptions(FLASH_OPTION);
1475 }
1476 return debugGraphics;
|