Rings
Version 0.3

threeD.ui.tree
Class SceneTreeNode

java.lang.Object
  extended bythreeD.ui.tree.SceneTreeNode
All Implemented Interfaces:
EventListener, javax.swing.tree.TreeNode, TreeNode

public class SceneTreeNode
extends java.lang.Object
implements TreeNode, EventListener

A SceneTreeNode object allows a Scene object to be represented by a TreeNode component that can be added to a JTree component.


Constructor Summary
SceneTreeNode(Scene scene)
          Constructs a new SceneTreeNode object using the specified Scene object.
 
Method Summary
 java.util.Enumeration children()
          Returns the children of this SceneTreeNode object as an Enumeration.
 void eventFired(Event event)
          Method called when an event has been fired.
 boolean getAllowsChildren()
          Returns true (A SceneTreeNode always allows children).
 javax.swing.tree.TreeNode getChildAt(int index)
          Returns the child of this SceneTreeNode object at the specified index.
 int getChildCount()
          Returns the number of children contained by this SceneTreeNode object.
 int getIndex(javax.swing.tree.TreeNode node)
          Returns the index of the specified TreeNode object in this SceneTreeNode object's children.
 javax.swing.tree.TreeNode getParent()
          Returns null (A SceneTreeNode is a root node and has no parent).
 Scene getScene()
          Returns the Scene object stored by this SceneTreeNode object.
 boolean isLeaf()
          Returns false (A SceneTreeNode is never a leaf).
 java.lang.String toString()
          Returns "Scene".
 void updateChildren()
          Updates the children of this SceneTreeNode object so that they match the stored Scene object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SceneTreeNode

public SceneTreeNode(Scene scene)
Constructs a new SceneTreeNode object using the specified Scene object.

Method Detail

getScene

public Scene getScene()
Returns the Scene object stored by this SceneTreeNode object.


updateChildren

public void updateChildren()
Updates the children of this SceneTreeNode object so that they match the stored Scene object.


eventFired

public void eventFired(Event event)
Method called when an event has been fired.

Specified by:
eventFired in interface EventListener

children

public java.util.Enumeration children()
Returns the children of this SceneTreeNode object as an Enumeration.

Specified by:
children in interface javax.swing.tree.TreeNode

getChildAt

public javax.swing.tree.TreeNode getChildAt(int index)
Returns the child of this SceneTreeNode object at the specified index.

Specified by:
getChildAt in interface javax.swing.tree.TreeNode

getChildCount

public int getChildCount()
Returns the number of children contained by this SceneTreeNode object.

Specified by:
getChildCount in interface javax.swing.tree.TreeNode

getParent

public javax.swing.tree.TreeNode getParent()
Returns null (A SceneTreeNode is a root node and has no parent).

Specified by:
getParent in interface javax.swing.tree.TreeNode

getIndex

public int getIndex(javax.swing.tree.TreeNode node)
Returns the index of the specified TreeNode object in this SceneTreeNode object's children. If the specified TreeNode object is unmatched -1 will be returned.

Specified by:
getIndex in interface javax.swing.tree.TreeNode

getAllowsChildren

public boolean getAllowsChildren()
Returns true (A SceneTreeNode always allows children).

Specified by:
getAllowsChildren in interface javax.swing.tree.TreeNode

isLeaf

public boolean isLeaf()
Returns false (A SceneTreeNode is never a leaf).

Specified by:
isLeaf in interface javax.swing.tree.TreeNode

toString

public java.lang.String toString()
Returns "Scene".


Rings
Version 0.3

Copyright 2003-05 Mike Murray