Mercurial > hg > ristipolku
comparison game/IDMContainer.java @ 134:4c0dec72e2f0
Whitespace cosmetic cleanup.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 24 Nov 2011 21:51:54 +0200 |
parents | b586ce4f6d97 |
children | d6d92845d6a2 |
comparison
equal
deleted
inserted
replaced
133:881deac2daf8 | 134:4c0dec72e2f0 |
---|---|
21 { | 21 { |
22 children = new ArrayList<IDMWidget>(); | 22 children = new ArrayList<IDMWidget>(); |
23 iterated = 0; | 23 iterated = 0; |
24 modified = false; | 24 modified = false; |
25 } | 25 } |
26 | 26 |
27 synchronized public void add(IDMWidget widget) | 27 synchronized public void add(IDMWidget widget) |
28 { | 28 { |
29 widget.setParent(this); | 29 widget.setParent(this); |
30 if (iterated > 0) | 30 if (iterated > 0) |
31 { | 31 { |
33 modified = true; | 33 modified = true; |
34 } | 34 } |
35 else | 35 else |
36 children.add(widget); | 36 children.add(widget); |
37 } | 37 } |
38 | 38 |
39 synchronized public void remove(IDMWidget widget) | 39 synchronized public void remove(IDMWidget widget) |
40 { | 40 { |
41 widget.setParent(null); | 41 widget.setParent(null); |
42 if (iterated > 0) | 42 if (iterated > 0) |
43 { | 43 { |
79 { | 79 { |
80 final IDMWidget widget = iter.previous(); | 80 final IDMWidget widget = iter.previous(); |
81 widget.paint(g); | 81 widget.paint(g); |
82 } | 82 } |
83 } | 83 } |
84 | 84 |
85 synchronized public boolean mousePressed(MouseEvent e) | 85 synchronized public boolean mousePressed(MouseEvent e) |
86 { | 86 { |
87 try { | 87 try { |
88 beginIteration(); | 88 beginIteration(); |
89 for (IDMWidget widget : children) | 89 for (IDMWidget widget : children) |