Class DummyModifiableBodyDataProvider
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.grid.data.DummyModifiableBodyDataProvider
-
- All Implemented Interfaces:
IDataProvider
public class DummyModifiableBodyDataProvider extends Object implements IDataProvider
-
-
Constructor Summary
Constructors Constructor Description DummyModifiableBodyDataProvider(int columnCount, int rowCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumnCount()
Object
getDataValue(int columnIndex, int rowIndex)
Gets the value at the given column and row index.int
getRowCount()
void
setColumnCount(int columnCount)
You have to fire aStructuralRefreshEvent
after using this method for refreshing the NatTable.void
setDataValue(int columnIndex, int rowIndex, Object newValue)
Sets the value at the given column and row index.void
setRowCount(int rowCount)
You have to fire aStructuralRefreshEvent
after using this method for refreshing the NatTable.
-
-
-
Method Detail
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfaceIDataProvider
- Returns:
- The number of columns this
IDataProvider
handles.
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfaceIDataProvider
- Returns:
- The number of rows this
IDataProvider
handles.
-
setColumnCount
public void setColumnCount(int columnCount)
You have to fire aStructuralRefreshEvent
after using this method for refreshing the NatTable.- Parameters:
columnCount
- The column count to use.
-
setRowCount
public void setRowCount(int rowCount)
You have to fire aStructuralRefreshEvent
after using this method for refreshing the NatTable.- Parameters:
rowCount
- The row count to use.
-
getDataValue
public Object getDataValue(int columnIndex, int rowIndex)
Description copied from interface:IDataProvider
Gets the value at the given column and row index.- Specified by:
getDataValue
in interfaceIDataProvider
- Parameters:
columnIndex
- The column index of the cell whose value is requested.rowIndex
- The row index of the cell whose value is requested.- Returns:
- The data value associated with the specified cell coordintates.
-
setDataValue
public void setDataValue(int columnIndex, int rowIndex, Object newValue)
Description copied from interface:IDataProvider
Sets the value at the given column and row index. Optional operation. Should throw UnsupportedOperationException if this operation is not supported.- Specified by:
setDataValue
in interfaceIDataProvider
- Parameters:
columnIndex
- The column index of the cell whose value should be changed.rowIndex
- The row index of the cell whose value should be changed.newValue
- The new value that should be set.
-
-