home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161a.iso / handson / files / copyjava.exe / com / sun / java / swing / DebugGraphicsInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-02-26  |  1.3 KB  |  43 lines

  1. package com.sun.java.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.    void setDebugOptions(JComponent var1, int var2) {
  16.       if (this.componentToDebug == null) {
  17.          this.componentToDebug = new Hashtable();
  18.       }
  19.  
  20.       this.componentToDebug.put(var1, new Integer(var2));
  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.    DebugGraphicsInfo() {
  37.       this.flashColor = Color.red;
  38.       this.flashTime = 100;
  39.       this.flashCount = 2;
  40.       this.stream = System.out;
  41.    }
  42. }
  43.