예제 #1
0
  /** Sets the shared component. */
  protected void setSharedComponent(AXIComponent sharedComponent) {
    this.sharedComponent = sharedComponent;
    if (sharedComponent == null) {
      return;
    }
    AXIModelImpl thisModel = (AXIModelImpl) getModel();
    if (thisModel == sharedComponent.getModel()) {
      sharedComponent.addListener(this);
      return;
    }

    // keep listening to the other model
    thisModel.listenToReferencedModel(sharedComponent.getModel());
  }