java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
org.meowers.cide.edcide.EdCideTreeNode
- All Implemented Interfaces:
- java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode
- public class EdCideTreeNode
- extends javax.swing.tree.DefaultMutableTreeNode
This class provides the structure of a tree node for the various types of
GameObject data.
- Version:
- %I%, %G%
|
Field Summary |
protected org.meowers.cide.data.GameObject |
gameObj
This stores the GameObject associated with the tree node |
protected int |
gameObjType
This specifies the type of GameObject stored under this
node if we are a group. |
protected boolean |
group
This is true when this tree node is a group of other nodes. |
protected java.lang.String |
name
This is the name of the node when we are a group. |
|
Method Summary |
int |
getGameDataType()
Returns the type of tree node this is or the type of objects in this
group if this node is a group. |
org.meowers.cide.data.GameObject |
getGameObject()
Returns the GameObject associated with this tree node, or
null if this node is a group. |
boolean |
isGroup()
Used to determine if this node is a group or individual game object. |
void |
updateText()
Refreshes the text displayed in the tree to the current name of the
GameObject associated with this tree node. |
| Methods inherited from class javax.swing.tree.DefaultMutableTreeNode |
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject, toString |
gameObj
protected org.meowers.cide.data.GameObject gameObj
- This stores the
GameObject associated with the tree node
group
protected boolean group
- This is
true when this tree node is a group of other nodes.
gameObjType
protected int gameObjType
- This specifies the type of
GameObject stored under this
node if we are a group.
name
protected java.lang.String name
- This is the name of the node when we are a group.
EdCideTreeNode
public EdCideTreeNode(org.meowers.cide.data.GameObject gameObj)
- Creates a new
GameDataTreeNode and sets the
GameObject associated with this tree node to the one specified.
EdCideTreeNode
public EdCideTreeNode(java.lang.String name,
int gameObjType)
- Creates a new
GameDataTreeNode that represents a group of
objects.
getGameDataType
public int getGameDataType()
- Returns the type of tree node this is or the type of objects in this
group if this node is a group.
getGameObject
public org.meowers.cide.data.GameObject getGameObject()
- Returns the
GameObject associated with this tree node, or
null if this node is a group.
isGroup
public boolean isGroup()
- Used to determine if this node is a group or individual game object.
updateText
public void updateText()
- Refreshes the text displayed in the tree to the current name of the
GameObject associated with this tree node.