Version: 1.1.1

org.biomoby.service.dashboard.data
Class DataTypeModel

java.lang.Object
  extended by org.biomoby.service.dashboard.treetable.AbstractTreeTableModel
      extended by org.biomoby.service.dashboard.data.DataTypeModel
All Implemented Interfaces:
TreeModel, TreeTableModel

public class DataTypeModel
extends AbstractTreeTableModel

DataTypeModel is a TreeTableModel representing Biomoby data type with all their members expanded until primitive types found.

Version:
$Id: DataTypeModel.java,v 1.7 2006/02/08 05:57:41 senger Exp $
Author:
Martin Senger

Field Summary
static int COLUMN_ADD
          Index of a column allowing to add an empty HAS member.
static int COLUMN_CDATA
          Index of a column indicating that a value should be stored as CDATA.
static int COLUMN_CLONE
          Index of a column allowing to add a HAS member by duplicating an exiting one.
static int COLUMN_ID
          Index of a column with identifiers.
static int COLUMN_NS
          Index of a column with namespaces.
static int COLUMN_REMOVE
          Index of a column allowing to remove a HAS member.
static int COLUMN_TAREA
          Index of a column indicating that a value editor should allow more lines.
static int COLUMN_TREE
          Index of a column with a data type tree.
static int COLUMN_VALUE
          Index of a column with values.
 
Constructor Summary
DataTypeModel(MobyDataType rootType, MobyDataType[] dataTypes)
          Constructor.
 
Method Summary
 void fireTreeNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children)
           
 void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children)
          Notify all listeners that underlying tree structure has been changed.
 Object getChild(Object node, int i)
           
 int getChildCount(Object node)
           
 Class getColumnClass(int column)
          Returns the type for column number column.
 int getColumnCount()
          TreeTableModel interface
 String getColumnName(int column)
          Returns the name for column number column.
 String getColumnToolTip(int column)
          Return a header tool tip for the given column.
 Object getRoot()
          TreeModel interface
 Object getValueAt(Object node, int column)
          Returns the value to be displayed for node node, at column number column.
 boolean isCellEditable(Object node, int column)
          By default, make the column with the Tree in it the only editable one.
 boolean isLeaf(Object node)
           
 void setValueAt(Object aValue, Object node, int column)
          Sets the value for node node, at column number column.
 
Methods inherited from class org.biomoby.service.dashboard.treetable.AbstractTreeTableModel
addTreeModelListener, getIndexOfChild, removeTreeModelListener, valueForPathChanged
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLUMN_ADD

public static final int COLUMN_ADD
Index of a column allowing to add an empty HAS member.

See Also:
Constant Field Values

COLUMN_CLONE

public static final int COLUMN_CLONE
Index of a column allowing to add a HAS member by duplicating an exiting one.

See Also:
Constant Field Values

COLUMN_REMOVE

public static final int COLUMN_REMOVE
Index of a column allowing to remove a HAS member.

See Also:
Constant Field Values

COLUMN_TREE

public static final int COLUMN_TREE
Index of a column with a data type tree.

See Also:
Constant Field Values

COLUMN_ID

public static final int COLUMN_ID
Index of a column with identifiers.

See Also:
Constant Field Values

COLUMN_NS

public static final int COLUMN_NS
Index of a column with namespaces.

See Also:
Constant Field Values

COLUMN_VALUE

public static final int COLUMN_VALUE
Index of a column with values.

See Also:
Constant Field Values

COLUMN_TAREA

public static final int COLUMN_TAREA
Index of a column indicating that a value editor should allow more lines.

See Also:
Constant Field Values

COLUMN_CDATA

public static final int COLUMN_CDATA
Index of a column indicating that a value should be stored as CDATA.

See Also:
Constant Field Values
Constructor Detail

DataTypeModel

public DataTypeModel(MobyDataType rootType,
                     MobyDataType[] dataTypes)
Constructor.

Method Detail

getColumnToolTip

public String getColumnToolTip(int column)
Return a header tool tip for the given column.


fireTreeStructureChanged

public void fireTreeStructureChanged(Object source,
                                     Object[] path,
                                     int[] childIndices,
                                     Object[] children)
Notify all listeners that underlying tree structure has been changed. The parameters are the same as in javax.swing.event.TreeModelEvent.


fireTreeNodesRemoved

public void fireTreeNodesRemoved(Object source,
                                 Object[] path,
                                 int[] childIndices,
                                 Object[] children)

getRoot

public Object getRoot()
TreeModel interface

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

getChildCount

public int getChildCount(Object node)

getChild

public Object getChild(Object node,
                       int i)

isLeaf

public boolean isLeaf(Object node)
Specified by:
isLeaf in interface TreeModel
Overrides:
isLeaf in class AbstractTreeTableModel

isCellEditable

public boolean isCellEditable(Object node,
                              int column)
Description copied from class: AbstractTreeTableModel
By default, make the column with the Tree in it the only editable one. Making this column editable causes the JTable to forward mouse and keyboard events in the Tree column to the underlying JTree.

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

getColumnCount

public int getColumnCount()
TreeTableModel interface


getColumnName

public String getColumnName(int column)
Description copied from interface: TreeTableModel
Returns the name for column number column.


getColumnClass

public Class getColumnClass(int column)
Description copied from interface: TreeTableModel
Returns the type for column number column.

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

getValueAt

public Object getValueAt(Object node,
                         int column)
Description copied from interface: TreeTableModel
Returns the value to be displayed for node node, at column number column.


setValueAt

public void setValueAt(Object aValue,
                       Object node,
                       int column)
Description copied from interface: TreeTableModel
Sets the value for node node, at column number column.

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

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010