home *** CD-ROM | disk | FTP | other *** search
/ S283 Planetary Science &n…he Search for Life DVD 2 / DVD-ROM.iso / install / jre1_3 / lib / rt.jar / javax / swing / DebugGraphicsInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1979-12-31  |  1.1 KB  |  49 lines

  1. package javax.swing;
  2.  
  3. import java.awt.Color;
  4. import java.io.PrintStream;
  5. import java.util.Hashtable;
  6.  
  7. class DebugGraphicsInfo {
  8.    Color flashColor;
  9.    int flashTime;
  10.    int flashCount;
  11.    Hashtable componentToDebug;
  12.    JFrame debugFrame;
  13.    PrintStream stream;
  14.  
  15.    DebugGraphicsInfo() {
  16.       this.flashColor = Color.red;
  17.       this.flashTime = 100;
  18.       this.flashCount = 2;
  19.       this.debugFrame = null;
  20.       this.stream = System.out;
  21.    }
  22.  
  23.    void setDebugOptions(JComponent var1, int var2) {
  24.       if (this.componentToDebug == null) {
  25.          this.componentToDebug = new Hashtable();
  26.       }
  27.  
  28.       if (var2 > 0) {
  29.          this.componentToDebug.put(var1, new Integer(var2));
  30.       } else {
  31.          this.componentToDebug.remove(var1);
  32.       }
  33.  
  34.    }
  35.  
  36.    int getDebugOptions(JComponent var1) {
  37.       if (this.componentToDebug == null) {
  38.          return 0;
  39.       } else {
  40.          Integer var2 = (Integer)this.componentToDebug.get(var1);
  41.          return var2 == null ? 0 : var2;
  42.       }
  43.    }
  44.  
  45.    void log(String var1) {
  46.       this.stream.println(var1);
  47.    }
  48. }
  49.