ui.model
Class DatabaseModel

java.lang.Object
  extended by ui.model.AbstractTreeTableModel
      extended by ui.model.DatabaseModel
All Implemented Interfaces:
TreeModel, TreeTableModel

public class DatabaseModel
extends AbstractTreeTableModel

A kind of TreeTableModel representing an XML database.

Version:
1.0 2003-06-26
Author:
John Talbot

Field Summary
protected static String[] cNames
           
protected static Class[] cTypes
           
 
Fields inherited from class ui.model.AbstractTreeTableModel
listenerList, root
 
Constructor Summary
DatabaseModel(String rootPath)
          Creates a DatabaseModel with root rootPath.
 
Method Summary
 Object getChild(Object node, int i)
          Returns the child of node at index i.
 int getChildCount(Object node)
          Returns the number of children of node.
protected  Object[] getChildren(Object node)
           
 Class getColumnClass(int column)
          Returns the class for the particular column.
 int getColumnCount()
          Returns the number of columns.
 String getColumnName(int column)
          Returns the name for a particular column.
 Object getValueAt(Object node, int column)
          Returns the value of the particular column.
 boolean isLeaf(Object node)
          Returns true if the passed in object represents a leaf, false otherwise.
 
Methods inherited from class ui.model.AbstractTreeTableModel
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getRoot, isCellEditable, 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 String[] cNames

cTypes

protected static Class[] cTypes
Constructor Detail

DatabaseModel

public DatabaseModel(String rootPath)
Creates a DatabaseModel with root rootPath.

Method Detail

getChildCount

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


getChild

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


isLeaf

public boolean isLeaf(Object node)
Returns true if the passed in object represents a leaf, false otherwise.

Specified by:
isLeaf in interface TreeModel
Overrides:
isLeaf in class AbstractTreeTableModel

getColumnCount

public int getColumnCount()
Returns the number of columns.


getColumnName

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


getColumnClass

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

Specified by:
getColumnClass in interface TreeTableModel
Overrides:
getColumnClass in class AbstractTreeTableModel

getValueAt

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


getChildren

protected Object[] getChildren(Object node)