org.jdesktop.binding.swingx.adapter
Class DOMAdapter

java.lang.Object
  extended by org.jdesktop.swingx.treetable.AbstractTreeTableModel
      extended by org.jdesktop.swingx.treetable.DefaultTreeTableModel
          extended by org.jdesktop.binding.swingx.adapter.DOMAdapter
All Implemented Interfaces:
javax.swing.tree.TreeModel, TreeTableModel

public class DOMAdapter
extends DefaultTreeTableModel


Field Summary
protected  org.w3c.dom.Document dom
           
 
Fields inherited from class org.jdesktop.swingx.treetable.DefaultTreeTableModel
asksAllowsChildren
 
Fields inherited from class org.jdesktop.swingx.treetable.AbstractTreeTableModel
hierarchicalColumnClass, listenerList, root
 
Constructor Summary
DOMAdapter()
           
DOMAdapter(org.w3c.dom.Document dom)
           
 
Method Summary
 void bind(org.w3c.dom.Document dom)
           
 java.lang.String convertValueToText(java.lang.Object value)
           
 java.lang.Object getChild(java.lang.Object parent, int index)
          Returns the child of parent at index index in the parent's child array.
 int getChildCount(java.lang.Object parent)
          Returns the number of children in the specified parent node.
 java.lang.Class getColumnClass(int column)
          
 int getColumnCount()
          
 int getColumnIndex(java.lang.String columnName)
           
 java.lang.String getColumnName(int column)
          
 HierarchicalDataMetaData getMetaData()
           
 java.lang.Object getRoot()
          
 java.lang.Object getValueAt(java.lang.Object node, int column)
           
 void setMetaData(HierarchicalDataMetaData metaData)
           
 
Methods inherited from class org.jdesktop.swingx.treetable.DefaultTreeTableModel
asksAllowsChildren, getPathToRoot, getPathToRoot, isLeaf, nodesChanged, nodeStructureChanged, nodesWereInserted, nodesWereRemoved, reload, reload, setAsksAllowsChildren, setRoot, setValueAt
 
Methods inherited from class org.jdesktop.swingx.treetable.AbstractTreeTableModel
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getListeners, getTreeModelListeners, isCellEditable, removeTreeModelListener, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dom

protected org.w3c.dom.Document dom
Constructor Detail

DOMAdapter

public DOMAdapter()

DOMAdapter

public DOMAdapter(org.w3c.dom.Document dom)
Method Detail

bind

public final void bind(org.w3c.dom.Document dom)

convertValueToText

public java.lang.String convertValueToText(java.lang.Object value)

getRoot

public java.lang.Object getRoot()
Description copied from class: AbstractTreeTableModel

Specified by:
getRoot in interface javax.swing.tree.TreeModel
Overrides:
getRoot in class AbstractTreeTableModel

getColumnClass

public java.lang.Class getColumnClass(int column)
Description copied from class: AbstractTreeTableModel

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

getChild

public java.lang.Object getChild(java.lang.Object parent,
                                 int index)
Description copied from class: AbstractTreeTableModel
Returns the child of parent at index index in the parent's child array. parent must be a node previously obtained from this data source. This should not return null if index is a valid index for parent (that is index >= 0 && index < getChildCount(parent)).

Specified by:
getChild in interface javax.swing.tree.TreeModel
Overrides:
getChild in class AbstractTreeTableModel
Parameters:
parent - a node in the tree, obtained from this data source
Returns:
the child of parent at index index, or null if the specified parent node is not a TreeNode.

getChildCount

public int getChildCount(java.lang.Object parent)
Description copied from class: AbstractTreeTableModel
Returns the number of children in the specified parent node.

Specified by:
getChildCount in interface javax.swing.tree.TreeModel
Overrides:
getChildCount in class AbstractTreeTableModel
Parameters:
parent - node whose child count is being requested
Returns:
the number of children in the specified parent node

setMetaData

public void setMetaData(HierarchicalDataMetaData metaData)

getMetaData

public HierarchicalDataMetaData getMetaData()

getColumnCount

public int getColumnCount()
Description copied from class: AbstractTreeTableModel

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

getColumnIndex

public int getColumnIndex(java.lang.String columnName)
Parameters:
columnName - String containing the name of the column
Returns:
integer index of column in the data model which corresponds to the specified column name
Throws:
java.lang.IllegalArgumentException - if the column name does not exist in this tabular data model

getColumnName

public java.lang.String getColumnName(int column)
Description copied from class: AbstractTreeTableModel

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

getValueAt

public java.lang.Object getValueAt(java.lang.Object node,
                                   int column)
Specified by:
getValueAt in interface TreeTableModel
Overrides:
getValueAt in class DefaultTreeTableModel


Copyright © 2005 Sun Microsystems All Rights Reserved.