void updateClassName(AgeAbstractClassImprint classImprint, String newName) { classImprint.setName(newName); for (ImprintTreeNode tn : nodeMap.get(classImprint)) { tn.setTitle(newName); } getData().setRoot(getData().getRoot()); }
void updateClassType(AgeAbstractClassImprint classImprint, boolean abstr) { classImprint.setAbstract(abstr); for (ImprintTreeNode tn : nodeMap.get(classImprint)) { tn.updateType(); } getData().setRoot(getData().getRoot()); }
private void createTreeStructure(AgeAbstractClassImprint cls, ImprintTreeNode node) { addNodeToMap(node); if ((direction == Direction.PARENT2CHILD && cls.getChildren() == null) || (direction == Direction.CHILD2PARENT && cls.getParents() == null)) return; TreeNode[] children = new TreeNode [direction == Direction.PARENT2CHILD ? cls.getChildren().size() : cls.getParents().size()]; int i = 0; for (AgeAbstractClassImprint subcls : direction == Direction.PARENT2CHILD ? cls.getChildren() : cls.getParents()) { ImprintTreeNode ctn = nodeCreator.create(subcls); children[i++] = ctn; createTreeStructure(subcls, ctn); } node.setChildren(children); }