站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

TableModelFilter (NetBeans View Model) - NetBeans API Javadoc 4.1.0

 

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

public 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 . You should not throw UnknownTypeException directly from this method!

Parameters:
original - the original table model
node - a object returned from 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

public 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 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

public 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 . You should not throw UnknownTypeException directly from this method!

Parameters:
original - the original table model
node - a object returned from 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

public void addModelListener(ModelListener l)
Registers given listener.

Parameters:
l - the listener to add

removeModelListener

public void removeModelListener(ModelListener l)
Unregisters given listener.

Parameters:
l - the listener to remove

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.