com.acarter.jmejtree.treenode
Class TextureTreeNode

java.lang.Object
  extended by com.acarter.jmejtree.treenode.TextureTreeNode
All Implemented Interfaces:
ComposableTreeNode

public class TextureTreeNode
extends java.lang.Object
implements ComposableTreeNode

Author:
Carter

Constructor Summary
TextureTreeNode()
           
 
Method Summary
 java.lang.Object getChild(java.lang.Object parent, int index)
          Returns the child of the parent given the index.
 int getChildCount(java.lang.Object parent)
          Counts the number of children of this type under this parent.
 int getChildIndex(java.lang.Object parent, java.lang.Object child)
          Returns the index of the child.
 javax.swing.Icon getIcon(java.lang.Object node)
          Returns a icon to be rendered in the tree.
 java.lang.Class<?> getNodeClassType()
          Returns the class type of objects this tree node represents.
 java.lang.String getNodeText(java.lang.Object node, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
          Returns a textual representation of this tree node.
 java.lang.String getNodeToolTipText(java.lang.Object node, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
          Returns a meaningful tool tip description of this tree node.
 java.lang.Object getParent(java.lang.Object child)
          Returns the parent object of the given child.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextureTreeNode

public TextureTreeNode()
Method Detail

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
Description copied from interface: ComposableTreeNode
Returns the child of the parent given the index.

Specified by:
getChild in interface ComposableTreeNode
Parameters:
parent - parent object
index - Index of the child
Returns:
the child, or null
See Also:
ComposableTreeNode.getChild(java.lang.Object, int)

getChildCount

public int getChildCount(java.lang.Object parent)
Description copied from interface: ComposableTreeNode
Counts the number of children of this type under this parent.

Specified by:
getChildCount in interface ComposableTreeNode
Parameters:
parent - the object with the children to count
Returns:
the number of children represented by this tree node type
See Also:
ComposableTreeNode.getChildCount(java.lang.Object)

getChildIndex

public int getChildIndex(java.lang.Object parent,
                         java.lang.Object child)
Description copied from interface: ComposableTreeNode
Returns the index of the child.

Specified by:
getChildIndex in interface ComposableTreeNode
Parameters:
parent - the parent object
child - the child of the parent
Returns:
index of the child, or -1 if not a child
See Also:
ComposableTreeNode.getChildIndex(java.lang.Object, java.lang.Object)

getParent

public java.lang.Object getParent(java.lang.Object child)
Description copied from interface: ComposableTreeNode
Returns the parent object of the given child.

Specified by:
getParent in interface ComposableTreeNode
Parameters:
child - the child object of the desired parent.
Returns:
the parent object if possible, or null
See Also:
ComposableTreeNode.getParent(java.lang.Object)

getNodeClassType

public java.lang.Class<?> getNodeClassType()
Description copied from interface: ComposableTreeNode
Returns the class type of objects this tree node represents.

Specified by:
getNodeClassType in interface ComposableTreeNode
Returns:
tree node class
See Also:
ComposableTreeNode.getNodeClassType()

getIcon

public javax.swing.Icon getIcon(java.lang.Object node)
Description copied from interface: ComposableTreeNode
Returns a icon to be rendered in the tree.

Specified by:
getIcon in interface ComposableTreeNode
Returns:
the icon, or null is no icon is desired
See Also:
ComposableTreeNode.getIcon(Object)

getNodeText

public java.lang.String getNodeText(java.lang.Object node,
                                    boolean selected,
                                    boolean expanded,
                                    boolean leaf,
                                    int row,
                                    boolean hasFocus)
Description copied from interface: ComposableTreeNode
Returns a textual representation of this tree node.

Specified by:
getNodeText in interface ComposableTreeNode
Parameters:
node - the Object to convert to text
selected - true if the node is selected
expanded - true if the node is expanded
leaf - true if the node is a leaf node
row - an integer specifying the node's display row, where 0 is the first row in the display
hasFocus - true if the node has the focus
Returns:
the String representation of the node's value
See Also:
ComposableTreeNode.getNodeText(Object, boolean, boolean, boolean, int, boolean)

getNodeToolTipText

public java.lang.String getNodeToolTipText(java.lang.Object node,
                                           boolean selected,
                                           boolean expanded,
                                           boolean leaf,
                                           int row,
                                           boolean hasFocus)
Description copied from interface: ComposableTreeNode
Returns a meaningful tool tip description of this tree node.

Specified by:
getNodeToolTipText in interface ComposableTreeNode
Parameters:
node - the Object to describe
selected - true if the node is selected
expanded - true if the node is expanded
leaf - true if the node is a leaf node
row - an integer specifying the node's display row, where 0 is the first row in the display
hasFocus - true if the node has the focus
Returns:
the String description of the node
See Also:
ComposableTreeNode.getNodeToolTipText(Object, boolean, boolean, boolean, int, boolean)