de.jaret.util.ui.table.model
Interface IJaretTableModel

All Known Implementing Classes:
AbstractJaretTableModel, DefaultJaretTableModel, PropListeningTableModel, SimpleJaretTableModel, StdHierarchicalTableModel

public interface IJaretTableModel

Interface for the table model used by the jaret table. The model should always provide all data. Sorting and filtering is done by the jaret table displaying the data.

Version:
$Id: IJaretTableModel.java 385 2007-04-29 20:31:49Z olk $
Author:
Peter Kliem

Method Summary
 void addColumn(IColumn column)
          Add a column.
 void addJaretTableModelListener(IJaretTableModelListener jtml)
          Add a listener listening for changes on the model.
 IColumn getColumn(int idx)
          Retrieve a column specified by it's index.
 IColumn getColumn(java.lang.String id)
          Retrieve a column specified by it's id.
 int getColumnCount()
          Retrieve the number of columns.
 IRow getRow(int idx)
          Retrieve a specific row.
 int getRowCount()
          Return the number of rows in the model.
 boolean isEditable(IRow row, IColumn column)
          Check whether a cell is editable.
 void removeJaretTableModelListener(IJaretTableModelListener jtml)
          Remove a listener on the model.
 void setValue(IRow row, IColumn column, java.lang.Object value)
          Set the value of a particular cell.
 

Method Detail

getRowCount

int getRowCount()
Return the number of rows in the model.

Returns:
number of rows

getRow

IRow getRow(int idx)
Retrieve a specific row.

Parameters:
idx - index of the row
Returns:
the row

getColumnCount

int getColumnCount()
Retrieve the number of columns.

Returns:
the number of columns.

getColumn

IColumn getColumn(int idx)
Retrieve a column specified by it's index.

Parameters:
idx - index of the column to retrieve
Returns:
column at index idx

getColumn

IColumn getColumn(java.lang.String id)
Retrieve a column specified by it's id.

Parameters:
id - id of the column to retrieve
Returns:
column for the given id or null if the column coud not be found

isEditable

boolean isEditable(IRow row,
                   IColumn column)
Check whether a cell is editable.

Parameters:
row - row of the cell
column - column of the cell
Returns:
true for an editable cell

setValue

void setValue(IRow row,
              IColumn column,
              java.lang.Object value)
Set the value of a particular cell.

Parameters:
row - row of the cell
column - column of the cell
value - the value to be stored

addColumn

void addColumn(IColumn column)
Add a column.

Parameters:
column - column to add

addJaretTableModelListener

void addJaretTableModelListener(IJaretTableModelListener jtml)
Add a listener listening for changes on the model.

Parameters:
jtml - listener to add

removeJaretTableModelListener

void removeJaretTableModelListener(IJaretTableModelListener jtml)
Remove a listener on the model.

Parameters:
jtml - listener to remove


Copyright © 2012. All Rights Reserved.