Exemplo n.º 1
0
  private void removeAllListeners() {
    if (pcs == null) return;

    for (AXIComponent listener : getRefSet()) {
      removeListener(listener);
    }
  }
Exemplo n.º 2
0
  /** The proxy component receives an event notification. */
  public void propertyChange(PropertyChangeEvent evt) {
    AXIComponent source = (AXIComponent) evt.getSource();
    String property = evt.getPropertyName();
    if (!isInModel()) {
      // Ideally it shouldn't come here. Remove this as listener
      // and make shared as null, so that it'll be GCed.
      source.removeListener(this);
      // setSharedComponent(null);
      return;
    }
    // if(evt.getOldValue() == null && evt.getNewValue() != null) {
    if (PROP_CHILD_ADDED.equals(property)) {
      onChildAdded(evt);
      return;
    }
    // if(evt.getOldValue() != null && evt.getNewValue() == null) {
    if (PROP_CHILD_REMOVED.equals(property)) {
      onChildDeleted(evt);
      return;
    }

    firePropertyChangeEvent(evt.getPropertyName(), evt.getOldValue(), evt.getNewValue());
  }