com.virtuosotechnologies.lib.command
Class ChildAddedEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.virtuosotechnologies.lib.command.CommandNodeEvent
          extended bycom.virtuosotechnologies.lib.command.ChildAddedEvent
All Implemented Interfaces:
Serializable

public class ChildAddedEvent
extends CommandNodeEvent

An event indicating a child was added

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ChildAddedEvent(CommandNode parent, CommandNode child, int childIndex)
          Constructor.
 
Method Summary
 int getChildIndex()
          Get the index of the child node
 CommandNode getChildNode()
          Get the child command node
 
Methods inherited from class com.virtuosotechnologies.lib.command.CommandNodeEvent
getParentNode
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChildAddedEvent

public ChildAddedEvent(CommandNode parent,
                       CommandNode child,
                       int childIndex)
Constructor.

Parameters:
parent - the CommandNode whose children have changed
child - the CommandNode that was added
childIndex - the index of the CommandNode that was added
Method Detail

getChildNode

public final CommandNode getChildNode()
Get the child command node

Returns:
the child CommandNode

getChildIndex

public final int getChildIndex()
Get the index of the child node

Returns:
0-based index