// interface ModelListener public void modelChanged(ModelEvent event) { ModelListener lastListener = null; for (ModelListener l : listeners) { if (l != lastListener) { l.modelChanged(event); lastListener = l; } } }
// interface ex-TreeModelListener public void treeChanged() { ModelListener lastListener = null; for (ModelListener l : listeners) { if (l != lastListener) { // OLD l.treeChanged(); l.modelChanged(new ModelEvent.TreeChanged(this)); lastListener = l; } } }
// interface ex-TreeModelListener public void treeNodeChanged(Object node) { // System.out.println // (owner + " ModelListenerSupport.treeNodeChanged() " + // listeners.size() + " listeners"); ModelListener lastListener = null; for (ModelListener l : listeners) { if (l != lastListener) { // OLD l.treeNodeChanged(node); l.modelChanged(new ModelEvent.NodeChanged(this, node)); lastListener = l; } } }
public void setTarget(String target) { this.target = target; shortName = null; // reset cache // force a re-rendering of the _whole_ tree becauase unique names // might get affected by this. if (updater != null) { // OLD updater.treeChanged(); updater.modelChanged(new ModelEvent.TreeChanged(this)); } }
public void update() { // OLD updater.treeNodeChanged(coreSession); updater.modelChanged(new ModelEvent.NodeChanged(this, coreSession)); }