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); } } }
/** @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(); }
public void detachView() { kernel.detach(this); clearView(); attached = false; }
public void attachView() { clearView(); kernel.notifyAddAll(this); kernel.attach(this); attached = true; }