AutomatedTreeModel: + isContainer()

thobaben_diagram
Harald Wolff 2016-12-15 10:19:29 +01:00
parent 86d676041e
commit 984991130a
2 changed files with 5 additions and 1 deletions

View File

@ -69,7 +69,7 @@ public class AutomatedTreeModel implements TreeModel,AutomatedTreeNodeListener {
@Override
public boolean isLeaf(Object parent) {
AutomatedTreeNode node = (AutomatedTreeNode)parent;
return node.getChildren().length > 0 ? false : true;
return !node.isContainer();
}

View File

@ -95,4 +95,8 @@ public abstract class AutomatedTreeNode implements Comparable<AutomatedTreeNode>
fireChildRemoved(node, child, index);
}
public boolean isContainer(){
return getChildren().length > 0 ? false : true;
}
}