Пример #1
0
 /** 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);
   }
 }
Пример #2
0
 public void notifyObservers_for_selected_shape(int value) {
   for (Observer obs : observers) {
     obs.updateSelectShape(value);
   }
 }
Пример #3
0
 private void notifyObservers() {
   for (Observer obs : observers) {
     obs.update(cpt);
   }
 }