Example #1
0
 public void setExpand(boolean isExpand) {
   this.isExpand = isExpand;
   if (!isExpand) {
     for (Node node : children) {
       node.setExpand(false);
     }
   }
 }
Example #2
0
 public int getLevel() {
   return parent == null ? 0 : parent.getLevel() + 1;
 }