/** 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); } }
public void notifyObservers_for_selected_shape(int value) { for (Observer obs : observers) { obs.updateSelectShape(value); } }
private void notifyObservers() { for (Observer obs : observers) { obs.update(cpt); } }