summaryrefslogtreecommitdiff
path: root/NET/worlds/console/TreeNode.java
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-03 16:38:41 -0700
committerFuwn <[email protected]>2021-05-03 16:38:41 -0700
commite1e781bb2135ef78592226f1a3eaba4925702f1f (patch)
tree8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/console/TreeNode.java
downloadworlds.jar-main.tar.xz
worlds.jar-main.zip
:star:HEADmain
Diffstat (limited to 'NET/worlds/console/TreeNode.java')
-rw-r--r--NET/worlds/console/TreeNode.java116
1 files changed, 116 insertions, 0 deletions
diff --git a/NET/worlds/console/TreeNode.java b/NET/worlds/console/TreeNode.java
new file mode 100644
index 0000000..3395fb4
--- /dev/null
+++ b/NET/worlds/console/TreeNode.java
@@ -0,0 +1,116 @@
+/* */ package NET.worlds.console;
+/* */
+/* */ import java.util.Vector;
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public abstract class TreeNode
+/* */ {
+/* */ private int level;
+/* */ private TreeNode parent;
+/* */ private boolean isOpen;
+/* */
+/* */ protected TreeNode(TreeNode parent)
+/* */ {
+/* 33 */ this.parent = parent;
+/* 34 */ if (parent != null) {
+/* 35 */ this.level = (parent.getLevel() + 1);
+/* */ }
+/* */ }
+/* */
+/* */ public int getLevel() {
+/* 40 */ return this.level;
+/* */ }
+/* */
+/* */ public TreeNode getParent()
+/* */ {
+/* 45 */ return this.parent;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ public boolean isDescendant(TreeNode e)
+/* */ {
+/* 53 */ while (e != null)
+/* 54 */ if ((e = e.getParent()) == this)
+/* 55 */ return true;
+/* 56 */ return false;
+/* */ }
+/* */
+/* */ public boolean isOpen()
+/* */ {
+/* 61 */ return this.isOpen;
+/* */ }
+/* */
+/* */ public void setOpen(boolean isOpen)
+/* */ {
+/* 66 */ this.isOpen = isOpen;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ public boolean displayAsTitle()
+/* */ {
+/* 74 */ return false;
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public boolean equals(Object obj)
+/* */ {
+/* 83 */ return ((obj instanceof TreeNode)) &&
+/* 84 */ (getObject().equals(((TreeNode)obj).getObject()));
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */
+/* */ public int hashCode()
+/* */ {
+/* 93 */ return getObject().hashCode();
+/* */ }
+/* */
+/* */
+/* */
+/* */
+/* */ public abstract Vector<?> getChildren();
+/* */
+/* */
+/* */
+/* */
+/* */ public boolean shouldSort()
+/* */ {
+/* 106 */ return true;
+/* */ }
+/* */
+/* */ public abstract Object getObject();
+/* */ }
+
+
+/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\TreeNode.class
+ * Java compiler version: 6 (50.0)
+ * JD-Core Version: 0.7.1
+ */ \ No newline at end of file