DESY ACOP Beans Home

com.cosylab.gui.components.table
Class DefaultObjectTableEngine

java.lang.Object
  extended by com.cosylab.gui.components.table.DefaultObjectTableEngine
All Implemented Interfaces:
ObjectTableEngine

public class DefaultObjectTableEngine
extends java.lang.Object
implements ObjectTableEngine

Default implementation of the ObjectTableEngine.


Constructor Summary
DefaultObjectTableEngine()
           
 
Method Summary
 java.lang.String getColumnName(int i)
          Returns name of column.
protected  TableCell[] getTableCells(java.lang.Object key)
          Override this method to convert key object to own array of TableCell instances.
 TableRow getTableRow(java.lang.Object key)
          Creates new row for key object.
 void releaseTableRow(java.lang.Object key, TableRow row)
          Signals to factory that row with associated key is no longer in use.
 void setValue(java.lang.Object value, java.lang.Object key, TableRow row, int col)
          Dummy implementation: casts row element to TableCell and sets value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultObjectTableEngine

public DefaultObjectTableEngine()
Method Detail

getTableRow

public TableRow getTableRow(java.lang.Object key)
Description copied from interface: ObjectTableEngine
Creates new row for key object.

Specified by:
getTableRow in interface ObjectTableEngine
Parameters:
key - key for which row is created
Returns:
new or recycled table row

releaseTableRow

public void releaseTableRow(java.lang.Object key,
                            TableRow row)
Description copied from interface: ObjectTableEngine
Signals to factory that row with associated key is no longer in use.

Specified by:
releaseTableRow in interface ObjectTableEngine
Parameters:
key - kay object for row
row - row to be released

getTableCells

protected TableCell[] getTableCells(java.lang.Object key)
Override this method to convert key object to own array of TableCell instances. Default implementation creates for each object own TableCell and returns it in an array.

Parameters:
key - key object
Returns:
array of table cells

setValue

public void setValue(java.lang.Object value,
                     java.lang.Object key,
                     TableRow row,
                     int col)
Dummy implementation: casts row element to TableCell and sets value

Specified by:
setValue in interface ObjectTableEngine
Parameters:
value - new value as user has set with table editors
key - the key object
row - row associated with kay object
col - DOCUMENT ME!
See Also:
ObjectTableEngine.setValue(Object, Object, TableRow, int)

getColumnName

public java.lang.String getColumnName(int i)
Description copied from interface: ObjectTableEngine
Returns name of column. Same order of columns must be used when construction rows.

Specified by:
getColumnName in interface ObjectTableEngine
Returns:
name of column, or null


Copyright © 2010. All Rights Reserved.