DESY ACOP Beans Home

com.cosylab.gui.components.table
Interface TableRow

All Known Implementing Classes:
TableRowArray

public interface TableRow

TableRow presents a row in a table.

Since:
May 3, 2004.
Version:
$Id: TableRow.java,v 1.6 2008-04-22 12:28:40 jbobnar Exp $
Author:
Igor Kriznar

Method Summary
 int compareTo(TableRow row, int valueIndex)
          Compares this table row with the specified table row for order.
 TableRowModel getParentModel()
          The parent model which contains this row.
 java.lang.Object getValueAt(int column)
          Returns value at column index.
 int getValueCount()
          Returns the number values int this row.
 boolean isValueSettable(int index)
          Return true if value at specified column index is editable.
 void setParentModel(TableRowModel model)
          This method is called when row is added to model.
 

Method Detail

getValueAt

java.lang.Object getValueAt(int column)
Returns value at column index.

Parameters:
column - the column index
Returns:
value at column index

getValueCount

int getValueCount()
Returns the number values int this row.

Returns:
the number values int this row

setParentModel

void setParentModel(TableRowModel model)
This method is called when row is added to model. When row is remove from the model, this method is called with parameter null.

Row can call on parent model method fireRowUpdate(TableRow,int) when want to notify model listeners (specially the JTable) about data changes.

Parameters:
model - the model to which row was added, or null, when row is removed form model
See Also:
TableRowModel.fireRowUpdate(TableRow, int)

getParentModel

TableRowModel getParentModel()
The parent model which contains this row.

Returns:
the parent model which contains this row.

isValueSettable

boolean isValueSettable(int index)
Return true if value at specified column index is editable.

Parameters:
index - the column index
Returns:
true if value at the specified column index is editable

compareTo

int compareTo(TableRow row,
              int valueIndex)
Compares this table row with the specified table row for order. Returns a negative integer, zero, or a positive integer as this row is less than, equal to, or greater than the specified row.

Parameters:
row - a row, to which it is compared
valueIndex - the index of value, which is compared in row
Returns:
negative integer, zero, or a positive integer as this row is less than, equal to, or greater than the specified row.


Copyright © 2010. All Rights Reserved.