// 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;
      }
    }
  }
Ejemplo n.º 4
0
  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));
    }
  }
Ejemplo n.º 5
0
 public void update() {
   // OLD updater.treeNodeChanged(coreSession);
   updater.modelChanged(new ModelEvent.NodeChanged(this, coreSession));
 }