Beispiel #1
0
 public boolean isLastNodeInParent() {
   if (parent != null) {
     List<TreeViewNode<T>> nodes = parent.getChildren();
     return getPositionInParent() == nodes.size() - 1;
   }
   return true;
 }
Beispiel #2
0
 public int getPositionInParent() {
   if (parent != null) {
     List<TreeViewNode<T>> nodes = parent.getChildren();
     return nodes.indexOf(this);
   }
   return 0;
 }
Beispiel #3
0
 public String getPositionInTree() {
   return parent != null ? parent.getPositionInTree() + "," + getPositionInParent() : "0";
 }
Beispiel #4
0
 public int getLevel() {
   return parent != null ? parent.getLevel() + 1 : 0;
 }