forked from LupusNobilis/java-org.hwo.ui
AutomatedTreeModel: + isContainer()
parent
86d676041e
commit
984991130a
|
@ -69,7 +69,7 @@ public class AutomatedTreeModel implements TreeModel,AutomatedTreeNodeListener {
|
||||||
@Override
|
@Override
|
||||||
public boolean isLeaf(Object parent) {
|
public boolean isLeaf(Object parent) {
|
||||||
AutomatedTreeNode node = (AutomatedTreeNode)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);
|
fireChildRemoved(node, child, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isContainer(){
|
||||||
|
return getChildren().length > 0 ? false : true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue