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 ObjectTableModel

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

All Implemented Interfaces:
  Serializable, TableModel

public class ObjectTableModel
extends DefaultTableModel

The ObjectTableModel is a TableModel whose rows are objects; columns are defined as Functors on the object.

See Also:
  Serialized Form

Field Summary

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

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

Constructor Summary
`ObjectTableModel(String[] headers, Class _objClass, Functor[] readFunctors, Functor[] writeFunctors, Class[] editorClasses)` The ObjectTableModel is a TableModel whose rows are objects; columns are defined as Functors on the object.
`ObjectTableModel(String[] headers, Functor[] readFunctors, Functor[] writeFunctors, Class[] editorClasses)` The ObjectTableModel is a TableModel whose rows are objects; columns are defined as Functors on the object.

Method Summary
`void` | `addRow(Object value)`
`boolean` | `checkFunctors(Object _value, Class caller)` Check all registered functors.
`void` | `clearData()`
`Class` | `getColumnClass(int arg0)`
`int` | `getColumnCount()`
`String` | `getColumnName(int col)`
`int` | `getRowCount()`
`Object` | `getValueAt(int row, int col)`
`void` | `insertRow(Object value, int index)`
`boolean` | `isCellEditable(int arg0, int arg1)`
`Iterator` | `iterator()`
`void` | `moveRow(int start, int end, int to)`
`void` | `removeRow(int row)`
`void` | `setValueAt(Object cellValue, int row, int col)`

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

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

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

Constructor Detail

### ObjectTableModel

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

  The ObjectTableModel is a TableModel whose rows are objects; columns are defined as Functors on the object.

Parameters:
  `headers` - - Column names
  `_objClass` - - Object class that will be used
  `readFunctors` - - used to get the values
  `writeFunctors` - - used to set the values
  `editorClasses` - - class for each column

### ObjectTableModel

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

  The ObjectTableModel is a TableModel whose rows are objects; columns are defined as Functors on the object.

Parameters:
  `headers` - - Column names
  `readFunctors` - - used to get the values
  `writeFunctors` - - used to set the values
  `editorClasses` - - class for each column

Method Detail

### iterator

    public Iterator iterator()

### clearData

    public void clearData()

### addRow

    public void addRow(Object value)

### insertRow

    public void insertRow(Object value,
                          int index)

### getColumnCount

    public int getColumnCount()

  See Also:
    `TableModel.getColumnCount()`

### getColumnName

    public String getColumnName(int col)

  See Also:
    `TableModel.getColumnName(int)`

### getRowCount

    public int getRowCount()

  See Also:
    `TableModel.getRowCount()`

### getValueAt

    public Object getValueAt(int row,
                             int col)

  See Also:
    `TableModel.getValueAt(int, int)`

### isCellEditable

    public boolean isCellEditable(int arg0,
                                  int arg1)

  See Also:
    `TableModel.isCellEditable(int, int)`

### moveRow

    public void moveRow(int start,
                        int end,
                        int to)

  See Also:
    `DefaultTableModel.moveRow(int, int, int)`

### removeRow

    public void removeRow(int row)

  See Also:
    `DefaultTableModel.removeRow(int)`

### setValueAt

    public void setValueAt(Object cellValue,
                           int row,
                           int col)

  See Also:
    `TableModel.setValueAt(java.lang.Object, int, int)`

### getColumnClass

    public Class getColumnClass(int arg0)

  See Also:
    `TableModel.getColumnClass(int)`

### checkFunctors

    public boolean checkFunctors(Object _value,
                                 Class caller)

  Check all registered functors.

  ** only for use in unit test code **

  Parameters:
    `_value` - - an instance of the table model row data item (if null, use the class passed to the constructor).
    `caller` - - class of caller.
  Returns:
    false if at least one Functor cannot be found.

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.