Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.jorphan.gui
Class AbstractTreeTableModel

    java.lang.Object
      javax.swing.table.AbstractTableModel
          javax.swing.table.DefaultTableModel
              org.apache.jorphan.gui.AbstractTreeTableModel

All Implemented Interfaces:
  Serializable, TableModel, TreeTableModel

Direct Known Subclasses:
  DefaultTreeTableModel

public abstract class AbstractTreeTableModel
extends DefaultTableModel
implements TreeTableModel

See Also:
  Serialized Form

Field Summary
`protected ArrayList` | `classes`
`protected List` | `headers`
`protected EventListenerList` | `listener`
`protected ArrayList` | `objects`
`protected ArrayList` | `readFunctors`
`protected TreeNode` | `rootNode`
`protected ArrayList` | `writeFunctors`

Fields inherited from class javax.swing.table.DefaultTableModel
`columnIdentifiers, dataVector`

Fields inherited from class javax.swing.table.AbstractTableModel
`listenerList`

Constructor Summary
`AbstractTreeTableModel(String[] headers, Functor[] readFunctors, Functor[] writeFunctors, Class[] editorClasses)`
`AbstractTreeTableModel(TreeNode root)`
`AbstractTreeTableModel(TreeNode root, boolean editable)`

Method Summary
`void` | `addTableModelListener(TableModelListener l)`
`void` | `clearData()`
`void` | `fireTreeNodesChanged(TreeNode source, Object[] path, int[] indexes, Object[] children)`
`Object` | `getChild(Object parent, int index)`
`int` | `getChildCount(Object parent)`
`Class` | `getColumnClass(int arg0)`
`int` | `getColumnCount()` The implementation is exactly the same as ObjectTableModel.getColumnCount.
`String` | `getColumnName(int columnIndex)`
`Object` | `getRootNode()` The root node for the TreeTable
`int` | `getRowCount()` The implementation is exactly the same as ObjectTableModel.getRowCount.
`Object` | `getValueAt(int rowIndex, int columnIndex)` Subclasses need to implement the logic for the method and return the value at the specific cell.
`Object` | `getValueAt(Object node, int col)` The method is similar to getValueAt(int,int).
`boolean` | `isCellEditable(int rowIndex, int columnIndex)` By default the abstract class returns true.
`boolean` | `isCellEditable(Object node, int col)` the method is similar to isCellEditable(int,int).
`boolean` | `isLeaf(Object node)` the implementation checks if the Object is a treenode.
`void` | `nodeStructureChanged(TreeNode node)`
`void` | `removeTableModelListener(TableModelListener l)`
`void` | `setValueAt(Object aValue, int rowIndex, int columnIndex)`
`void` | `setValueAt(Object val, Object node, int column)` the method is similar to isCellEditable(int,int).

Methods inherited from class javax.swing.table.DefaultTableModel
`addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getDataVector, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount`

Methods inherited from class javax.swing.table.AbstractTableModel
`findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### rootNode

    protected TreeNode rootNode

### listener

    protected EventListenerList listener

### objects

    protected transient ArrayList objects

### headers

    protected transient List headers

### classes

    protected transient ArrayList classes

### readFunctors

    protected transient ArrayList readFunctors

### writeFunctors

    protected transient ArrayList writeFunctors

Constructor Detail

### AbstractTreeTableModel

    public AbstractTreeTableModel(TreeNode root)

### AbstractTreeTableModel

    public AbstractTreeTableModel(TreeNode root,
                                  boolean editable)

### AbstractTreeTableModel

    public AbstractTreeTableModel(String[] headers,
                                  Functor[] readFunctors,
                                  Functor[] writeFunctors,
                                  Class[] editorClasses)

Method Detail

### getRootNode

    public Object getRootNode()

  The root node for the TreeTable

  Returns:
    the root node

### getValueAt

    public Object getValueAt(Object node,
                             int col)

  Description copied from interface: `TreeTableModel`
  The method is similar to getValueAt(int,int). Instead of int, the row is an object.

  Specified by:
    `getValueAt` in interface `TreeTableModel`
  Parameters:
    `node` -
    `col` -
  Returns:
    the value at the column

### isCellEditable

    public boolean isCellEditable(Object node,
                                  int col)

  Description copied from interface: `TreeTableModel`
  the method is similar to isCellEditable(int,int). Instead of int, the row is an object.

  Specified by:
    `isCellEditable` in interface `TreeTableModel`
  Parameters:
    `node` -
    `col` -
  Returns:
    if cell is editable

### setValueAt

    public void setValueAt(Object val,
                           Object node,
                           int column)

  Description copied from interface: `TreeTableModel`
  the method is similar to isCellEditable(int,int). Instead of int, the row is an object.

  Specified by:
    `setValueAt` in interface `TreeTableModel`
  Parameters:
    `val` -
    `node` -
    `column` -

### getColumnCount

    public int getColumnCount()

  The implementation is exactly the same as ObjectTableModel.getColumnCount.

  Specified by:
    `getColumnCount` in interface `TableModel`

### getRowCount

    public int getRowCount()

  The implementation is exactly the same as ObjectTableModel.getRowCount.

  Specified by:
    `getRowCount` in interface `TableModel`

### isCellEditable

    public boolean isCellEditable(int rowIndex,
                                  int columnIndex)

  By default the abstract class returns true. It is up to subclasses to override the implementation.

  Specified by:
    `isCellEditable` in interface `TableModel`

### getColumnClass

    public Class getColumnClass(int arg0)

  Specified by:
    `getColumnClass` in interface `TableModel`

### getValueAt

    public Object getValueAt(int rowIndex,
                             int columnIndex)

  Subclasses need to implement the logic for the method and return the value at the specific cell.

  Specified by:
    `getValueAt` in interface `TableModel`

### setValueAt

    public void setValueAt(Object aValue,
                           int rowIndex,
                           int columnIndex)

  Specified by:
    `setValueAt` in interface `TableModel`

### getColumnName

    public String getColumnName(int columnIndex)

  Specified by:
    `getColumnName` in interface `TableModel`

### getChildCount

    public int getChildCount(Object parent)

### getChild

    public Object getChild(Object parent,
                           int index)

### isLeaf

    public boolean isLeaf(Object node)

  the implementation checks if the Object is a treenode. If it is, it returns isLeaf(), otherwise it returns false.

  Parameters:
    `node` -
  Returns:
    whether object is a leaf node or not

### addTableModelListener

    public void addTableModelListener(TableModelListener l)

  Specified by:
    `addTableModelListener` in interface `TableModel`

### removeTableModelListener

    public void removeTableModelListener(TableModelListener l)

  Specified by:
    `removeTableModelListener` in interface `TableModel`

### nodeStructureChanged

    public void nodeStructureChanged(TreeNode node)

### fireTreeNodesChanged

    public void fireTreeNodesChanged(TreeNode source,
                                     Object[] path,
                                     int[] indexes,
                                     Object[] children)

### clearData

    public void clearData()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache JMeter
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1998-2009 Apache Software Foundation. All Rights Reserved.