jist.runtime.guilog
Class GuiLog.EventNode

java.lang.Object
  extended by jist.runtime.guilog.GuiLog.EventNode
Enclosing class:
GuiLog

public static class GuiLog.EventNode
extends java.lang.Object

An EventNode encapsulates the construct formed by an Event and the relationships it has with its parent and children Events. EventNodes strung together form a one-to-many tree structure.


Field Summary
private  java.util.Vector children
          The node's and Event's child EventNode(s).
private  Event ev
          The node's Event.
private  GuiLog.EventNode parent
          The node's and Event's parent EventNode.
 
Constructor Summary
GuiLog.EventNode(Event ev, GuiLog.EventNode parent)
          The constructor for the EventNode creates the relationships of Parent and Children between the Event and its Parent.
 
Method Summary
 void addChild(GuiLog.EventNode child)
          Adds a child EventNode to the node.
 GuiLog.EventNode getChild(int i)
          Returns a node's specific Child.
 Event getEvent()
          Returns the node's Event.
 int getNumChildren()
          Returns the node's number of Children.
 GuiLog.EventNode getParent()
          Returns the node's Parent.
 void removeChild(GuiLog.EventNode child)
          Remove a child EventNode from the node.
 void removeChildren()
          Removes all child EventNodes from the node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ev

private Event ev
The node's Event.


parent

private GuiLog.EventNode parent
The node's and Event's parent EventNode.


children

private java.util.Vector children
The node's and Event's child EventNode(s).

Constructor Detail

GuiLog.EventNode

public GuiLog.EventNode(Event ev,
                        GuiLog.EventNode parent)
The constructor for the EventNode creates the relationships of Parent and Children between the Event and its Parent.

Parameters:
ev - Event The node's Event.
parent - EventNode The node's parent EventNode.
Method Detail

getEvent

public Event getEvent()
Returns the node's Event.

Returns:
Event

getParent

public GuiLog.EventNode getParent()
Returns the node's Parent.

Returns:
EventNode

getNumChildren

public int getNumChildren()
Returns the node's number of Children.

Returns:
int

getChild

public GuiLog.EventNode getChild(int i)
Returns a node's specific Child.

Parameters:
i - int The desired index for the Child.
Returns:
EventNode The Child at the desired index.

addChild

public void addChild(GuiLog.EventNode child)
Adds a child EventNode to the node.

Parameters:
child - EventNode The child EventNode to add.

removeChild

public void removeChild(GuiLog.EventNode child)
Remove a child EventNode from the node.

Parameters:
child - EventNode The child EventNode to remove.

removeChildren

public void removeChildren()
Removes all child EventNodes from the node.