home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-20 | 1.9 KB | 63 lines |
- /*
- * @(#)DebugGraphicsInfo.java 1.4 98/01/30
- *
- * Copyright (c) 1997 Sun Microsystems, Inc. All Rights Reserved.
- *
- * This software is the confidential and proprietary information of Sun
- * Microsystems, Inc. ("Confidential Information"). You shall not
- * disclose such Confidential Information and shall use it only in
- * accordance with the terms of the license agreement you entered into
- * with Sun.
- *
- * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
- * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
- * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
- * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
- * THIS SOFTWARE OR ITS DERIVATIVES.
- *
- */
-
- package java.awt.swing;
-
- import java.awt.*;
- import java.util.*;
-
- /** Class used by DebugGraphics for maintaining information about how
- * to render graphics calls.
- *
- * @version 1.4 01/30/98
- * @author Dave Karlton
- */
- class DebugGraphicsInfo {
- Color flashColor = Color.red;
- int flashTime = 100;
- int flashCount = 2;
- Hashtable componentToDebug;
- JFrame debugFrame = null;
- java.io.PrintStream stream = System.out;
-
- void setDebugOptions(JComponent component, int debug) {
- if (componentToDebug == null) {
- componentToDebug = new Hashtable();
- }
- componentToDebug.put(component, new Integer(debug));
- }
-
- int getDebugOptions(JComponent component) {
- if (componentToDebug == null) {
- return 0;
- } else {
- Integer integer = (Integer)componentToDebug.get(component);
-
- return integer == null ? 0 : integer.intValue();
- }
- }
-
- void log(String string) {
- stream.println(string);
- }
- }
-
-
-