equal
deleted
inserted
replaced
35 */ |
35 */ |
36 class DebugGraphicsInfo { |
36 class DebugGraphicsInfo { |
37 Color flashColor = Color.red; |
37 Color flashColor = Color.red; |
38 int flashTime = 100; |
38 int flashTime = 100; |
39 int flashCount = 2; |
39 int flashCount = 2; |
40 Hashtable componentToDebug; |
40 Hashtable<JComponent, Integer> componentToDebug; |
41 JFrame debugFrame = null; |
41 JFrame debugFrame = null; |
42 java.io.PrintStream stream = System.out; |
42 java.io.PrintStream stream = System.out; |
43 |
43 |
44 void setDebugOptions(JComponent component, int debug) { |
44 void setDebugOptions(JComponent component, int debug) { |
45 if (debug == 0) { |
45 if (debug == 0) { |
46 return; |
46 return; |
47 } |
47 } |
48 if (componentToDebug == null) { |
48 if (componentToDebug == null) { |
49 componentToDebug = new Hashtable(); |
49 componentToDebug = new Hashtable<JComponent, Integer>(); |
50 } |
50 } |
51 if (debug > 0) { |
51 if (debug > 0) { |
52 componentToDebug.put(component, Integer.valueOf(debug)); |
52 componentToDebug.put(component, Integer.valueOf(debug)); |
53 } else { |
53 } else { |
54 componentToDebug.remove(component); |
54 componentToDebug.remove(component); |
57 |
57 |
58 int getDebugOptions(JComponent component) { |
58 int getDebugOptions(JComponent component) { |
59 if (componentToDebug == null) { |
59 if (componentToDebug == null) { |
60 return 0; |
60 return 0; |
61 } else { |
61 } else { |
62 Integer integer = (Integer)componentToDebug.get(component); |
62 Integer integer = componentToDebug.get(component); |
63 |
63 |
64 return integer == null ? 0 : integer.intValue(); |
64 return integer == null ? 0 : integer.intValue(); |
65 } |
65 } |
66 } |
66 } |
67 |
67 |