/** This should be executed in the ActionListener, but it can't. */
 private void update() {
   int value = getInt();
   if (0 <= value && value <= 100) {
     setText(getText());
     observer.update(this, value);
   }
 }
Beispiel #2
0
 public void notifyObservers_for_selected_shape(int value) {
   for (Observer obs : observers) {
     obs.updateSelectShape(value);
   }
 }
Beispiel #3
0
 private void notifyObservers() {
   for (Observer obs : observers) {
     obs.update(cpt);
   }
 }