AutomatedTreeModel: + isContainer()
parent
86d676041e
commit
984991130a
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -95,4 +95,8 @@ public abstract class AutomatedTreeNode implements Comparable<AutomatedTreeNode>
|
|||
fireChildRemoved(node, child, index);
|
||||
}
|
||||
|
||||
public boolean isContainer(){
|
||||
return getChildren().length > 0 ? false : true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue