X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=android-libraries%2FTreeViewList%2Fsrc%2Fpl%2Fpolidea%2Ftreeview%2FTreeNodeInfo.java;fp=android-libraries%2FTreeViewList%2Fsrc%2Fpl%2Fpolidea%2Ftreeview%2FTreeNodeInfo.java;h=32d18dd4461515edecf8f8d3e61fd54487bc3ce1;hb=bf3408aa65d45d99482d00baf5784dfde72d286d;hp=0000000000000000000000000000000000000000;hpb=5f8ec79bab328fdd08650f934b8e803a97c0583d;p=debian%2Fopenrocket diff --git a/android-libraries/TreeViewList/src/pl/polidea/treeview/TreeNodeInfo.java b/android-libraries/TreeViewList/src/pl/polidea/treeview/TreeNodeInfo.java new file mode 100644 index 00000000..32d18dd4 --- /dev/null +++ b/android-libraries/TreeViewList/src/pl/polidea/treeview/TreeNodeInfo.java @@ -0,0 +1,69 @@ +package pl.polidea.treeview; + +/** + * Information about the node. + * + * @param + * type of the id for the tree + */ +public class TreeNodeInfo { + private final T id; + private final int level; + private final boolean withChildren; + private final boolean visible; + private final boolean expanded; + + /** + * Creates the node information. + * + * @param id + * id of the node + * @param level + * level of the node + * @param withChildren + * whether the node has children. + * @param visible + * whether the tree node is visible. + * @param expanded + * whether the tree node is expanded + * + */ + public TreeNodeInfo(final T id, final int level, + final boolean withChildren, final boolean visible, + final boolean expanded) { + super(); + this.id = id; + this.level = level; + this.withChildren = withChildren; + this.visible = visible; + this.expanded = expanded; + } + + public T getId() { + return id; + } + + public boolean isWithChildren() { + return withChildren; + } + + public boolean isVisible() { + return visible; + } + + public boolean isExpanded() { + return expanded; + } + + public int getLevel() { + return level; + } + + @Override + public String toString() { + return "TreeNodeInfo [id=" + id + ", level=" + level + + ", withChildren=" + withChildren + ", visible=" + visible + + ", expanded=" + expanded + "]"; + } + +} \ No newline at end of file