com.isti.quakewatch.guiutil
Class EventTreeTableModel

java.lang.Object
  extended by com.isti.util.gui.AbstractTreeTableModel
      extended by com.isti.quakewatch.guiutil.EventTreeTableModel
All Implemented Interfaces:
TreeTableModel, javax.swing.tree.TreeModel

public class EventTreeTableModel
extends AbstractTreeTableModel

EventTreeTableModel is a TreeTableModel representing events.


Nested Class Summary
protected static class EventTreeTableModel.EventNode
          A EventNode is used to maintain a cache of an events's children.
 
Field Summary
protected static java.lang.String[] cNames
           
protected static java.lang.Class[] cTypes
           
 
Fields inherited from class com.isti.util.gui.AbstractTreeTableModel
listenerList, root
 
Constructor Summary
EventTreeTableModel(QWEventMsgRecord eventMsgRecord)
          Creates an EventTreeTableModel.
 
Method Summary
 java.lang.Object getChild(java.lang.Object node, int i)
          Returns the child of node at index i.
 int getChildCount(java.lang.Object node)
          Returns the number of children of node.
protected  java.lang.Object[] getChildren(java.lang.Object node)
          Returns the children for the particular node.
 java.lang.Class getColumnClass(int column)
          Returns the class for the particular column.
 int getColumnCount()
          Returns the number of columns.
 java.lang.String getColumnName(int column)
          Returns the name for a particular column.
 java.lang.String getLongestName()
           
 java.lang.String getLongestValue()
           
protected  java.lang.Object getObject(java.lang.Object node)
          Returns the object for the particular node.
 java.lang.Object getValueAt(java.lang.Object node, int column)
          Returns the value of the particular column.
 
Methods inherited from class com.isti.util.gui.AbstractTreeTableModel
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getRoot, isCellEditable, isLeaf, removeTreeModelListener, setValueAt, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cNames

protected static java.lang.String[] cNames

cTypes

protected static java.lang.Class[] cTypes
Constructor Detail

EventTreeTableModel

public EventTreeTableModel(QWEventMsgRecord eventMsgRecord)
Creates an EventTreeTableModel.

Parameters:
eventMsgRecord - the event message record for the event.
Method Detail

getLongestName

public java.lang.String getLongestName()
Returns:
the longest name string.

getLongestValue

public java.lang.String getLongestValue()
Returns:
the longest value string.

getChildCount

public int getChildCount(java.lang.Object node)
Returns the number of children of node.

Parameters:
node - the particular node.
Returns:
the number of children.

getChild

public java.lang.Object getChild(java.lang.Object node,
                                 int i)
Returns the child of node at index i.

Parameters:
node - the particular node.
i - the index of the child.
Returns:
the child.

getColumnCount

public int getColumnCount()
Returns the number of columns.

Returns:
the number of columns.

getColumnName

public java.lang.String getColumnName(int column)
Returns the name for a particular column.

Parameters:
column - the particular column.
Returns:
the name for a particular column.

getColumnClass

public java.lang.Class getColumnClass(int column)
Returns the class for the particular column.

Specified by:
getColumnClass in interface TreeTableModel
Overrides:
getColumnClass in class AbstractTreeTableModel
Parameters:
column - the particular column.
Returns:
the Class.

getValueAt

public java.lang.Object getValueAt(java.lang.Object node,
                                   int column)
Returns the value of the particular column.

Parameters:
node - the particular node.
column - the particular column.
Returns:
the value of the particular column.

getObject

protected java.lang.Object getObject(java.lang.Object node)
Returns the object for the particular node.

Parameters:
node - the particular node.
Returns:
the object for the particular node.

getChildren

protected java.lang.Object[] getChildren(java.lang.Object node)
Returns the children for the particular node.

Parameters:
node - the particular node.
Returns:
the children for the particular node.