Ejemplo n.º 1
0
  public void setShowAuxiliaryObjects(boolean flag) {

    app.showAuxiliaryObjects = flag;

    cancelEditing();

    if (flag) {
      clearView();

      switch (getTreeMode()) {
        case DEPENDENCY:
          model.insertNodeInto(auxiliaryNode, rootDependency, rootDependency.getChildCount());
          break;
      }

      kernel.notifyAddAll(this);
    } else {
      // if we're listing the auxiliary objects in a single leaf we can
      // just remove that leaf, but for type-based categorization those
      // auxiliary nodes might be scattered across the whole tree,
      // therefore we just rebuild the tree
      switch (getTreeMode()) {
        case DEPENDENCY:
          if (auxiliaryNode.getParent() != null) {
            model.removeNodeFromParent(auxiliaryNode);
          }
          break;
        default:
          clearView();
          kernel.notifyAddAll(this);
      }
    }
  }
Ejemplo n.º 2
0
  /** @param value Either AlgebraView.MODE_DEPDENCY or AlgebraView.MODE_TYPE */
  public void setTreeMode(SortMode value) {
    if (getTreeMode().equals(value)) {
      return;
    }

    clearView();

    this.treeMode = value;
    initModel();

    kernel.notifyAddAll(this);
    setLabels();
  }
Ejemplo n.º 3
0
 public void detachView() {
   kernel.detach(this);
   clearView();
   attached = false;
 }
Ejemplo n.º 4
0
 public void attachView() {
   clearView();
   kernel.notifyAddAll(this);
   kernel.attach(this);
   attached = true;
 }