home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 144 / DPCS0200.iso / Internet / Supanet / system / swing.jar / javax / swing / DebugGraphicsInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-11-05  |  1.2 KB  |  44 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.    int getDebugOptions(JComponent var1) {
  24.       if (this.componentToDebug == null) {
  25.          return 0;
  26.       } else {
  27.          Integer var2 = (Integer)this.componentToDebug.get(var1);
  28.          return var2 == null ? 0 : var2;
  29.       }
  30.    }
  31.  
  32.    void log(String var1) {
  33.       this.stream.println(var1);
  34.    }
  35.  
  36.    void setDebugOptions(JComponent var1, int var2) {
  37.       if (this.componentToDebug == null) {
  38.          this.componentToDebug = new Hashtable();
  39.       }
  40.  
  41.       this.componentToDebug.put(var1, new Integer(var2));
  42.    }
  43. }
  44.