org.netbeans.spi.viewmodel/2 1.9.22

org.netbeans.spi.viewmodel
Interface TableModelFilter

All Superinterfaces:
Model

public interface TableModelFilter
extends Model

Allows to filter content of some existing TableModel. You can add a new column, remmove some existing one, or change content of some existing column.


Method Summary
 void addModelListener(ModelListener l)
          Registers given listener.
 Object getValueAt(TableModel original, Object node, String columnID)
          Returns filterred value to be displayed in column columnID and row node.
 boolean isReadOnly(TableModel original, Object node, String columnID)
          Filters original isReadOnly value from given table model.
 void removeModelListener(ModelListener l)
          Unregisters given listener.
 void setValueAt(TableModel original, Object node, String columnID, Object value)
          Changes a value displayed in column columnID and row node.
 

Method Detail

getValueAt

Object getValueAt(TableModel original,
                  Object node,
                  String columnID)
                  throws UnknownTypeException
Returns filterred value to be displayed in column columnID and row node. Column ID is defined in by ColumnModel.getID(), and rows are defined by values returned from TreeModel.getChildren(java.lang.Object, int, int). You should not throw UnknownTypeException directly from this method!

Parameters:
original - the original table model
node - a object returned from TreeModel.getChildren(java.lang.Object, int, int) for this row
columnID - a id of column defined by ColumnModel.getID()
Returns:
value of variable representing given position in tree table.
Throws:
UnknownTypeException - this exception can be thrown from original.getValueAt (...) method call only!

isReadOnly

boolean isReadOnly(TableModel original,
                   Object node,
                   String columnID)
                   throws UnknownTypeException
Filters original isReadOnly value from given table model. You should not throw UnknownTypeException directly from this method!

Parameters:
original - the original table model
node - a object returned from TreeModel.getChildren(java.lang.Object, int, int) for this row
columnID - a id of column defined by ColumnModel.getID()
Returns:
true if variable on given position is read only
Throws:
UnknownTypeException - this exception can be thrown from original.isReadOnly (...) method call only!

setValueAt

void setValueAt(TableModel original,
                Object node,
                String columnID,
                Object value)
                throws UnknownTypeException
Changes a value displayed in column columnID and row node. Column ID is defined in by ColumnModel.getID(), and rows are defined by values returned from TreeModel.getChildren(java.lang.Object, int, int). You should not throw UnknownTypeException directly from this method!

Parameters:
original - the original table model
node - a object returned from TreeModel.getChildren(java.lang.Object, int, int) for this row
columnID - a id of column defined by ColumnModel.getID()
value - a new value of variable on given position
Throws:
UnknownTypeException - this exception can be thrown from original.setValueAt (...) method call only!

addModelListener

void addModelListener(ModelListener l)
Registers given listener.

Parameters:
l - the listener to add

removeModelListener

void removeModelListener(ModelListener l)
Unregisters given listener.

Parameters:
l - the listener to remove

org.netbeans.spi.viewmodel/2 1.9.22

Built on July 11 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.