Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.spi.viewmodel/2 1.9.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.netbeans.spi.viewmodel
Interface TableModel

All Superinterfaces:
  Model

All Known Implementing Classes:
  Models.CompoundModel

    public interface TableModel

extends Model

Adds support for columns to basic `TreeModel`.

Method Summary
`void` | `addModelListener(ModelListener l)` Registers given listener.
`Object` | `getValueAt(Object node, String columnID)` Returns value to be displayed in column `columnID` and row identified by `node`.
`boolean` | `isReadOnly(Object node, String columnID)` Returns true if value displayed in column `columnID` and row `node` is read only.
`void` | `removeModelListener(ModelListener l)` Unregisters given listener.
`void` | `setValueAt(Object node, String columnID, Object value)` Changes a value displayed in column `columnID` and row `node`.

Method Detail

### getValueAt

    Object getValueAt(Object node,
                      String columnID)
                      throws UnknownTypeException

  Returns value to be displayed in column `columnID` and row identified by `node`. Column ID is defined in by `ColumnModel.getID()`, and rows are defined by values returned from `TreeModel.getChildren(java.lang.Object, int, int)`.

  Parameters:
    `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` - if there is no TableModel defined for given parameter type

### isReadOnly

    boolean isReadOnly(Object node,
                       String columnID)
                       throws UnknownTypeException

  Returns true if value displayed in column `columnID` and row `node` is read only. Column ID is defined in by `ColumnModel.getID()`, and rows are defined by values returned from `TreeModel.getChildren(java.lang.Object, int, int)`.

  Parameters:
    `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` - if there is no TableModel defined for given parameter type

### setValueAt

    void setValueAt(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)`.

  Parameters:
    `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` - if there is no TableModel defined for given parameter type

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.spi.viewmodel/2 1.9.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.