net.rim.device.api.ui.component.table
Class AbstractTableModel

java.lang.Object
  extended by net.rim.device.api.ui.component.table.DataModel
      extended by net.rim.device.api.ui.component.table.AbstractTableModel
Direct Known Subclasses:
TableModel, TableModelAdapter

public abstract class AbstractTableModel
extends DataModel

A model for table components. Implementations of AbstractTableModel provide a representation of the data to be displayed in the view, e.g. concrete data structures, or an adapter to data stores in an alternative structure. It should handle requests from the controller and subsequently notify the view of any changes via listeners.

Since:
BlackBerry API 6.0.0

Constructor Summary
AbstractTableModel()
          Default constructor.
 
Method Summary
 void addColumn(Object data)
          Add a column to the data model.
 void addColumn(Object data, boolean doNotifyListeners)
          Add a column to the data model.
 void addMultipleRows(Object[] data)
          Adds multiple rows to the model.
 void addRow(Object data)
          Add a row to the model.
 void addRow(Object data, boolean doNotifyListeners)
          Add a row to the model.
protected abstract  boolean doAddColumn(Object data)
          This method provides the ability to customize the logic behind addColumn() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
protected  boolean doAddMultipleRows(Object[] data)
          This method provides the ability to customize the logic behind addMultipleRows() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
protected abstract  boolean doAddRow(Object data)
          This method provides the ability to customize the logic behind addRow() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
protected abstract  Object doGetColumn(int columnIndex)
          This method provides the ability to customize the logic behind getColumn() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
protected abstract  Object doGetElement(int rowIndex, int columnIndex)
          This method provides the ability to customize the logic behind getElement() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
protected abstract  Object doGetRow(int rowIndex)
          This method provides the ability to customize the logic behind getRow() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
protected abstract  boolean doInsertColumnAt(int columnIndex, Object data)
          This method provides the ability to customize the logic behind insertColumnAt() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
protected  boolean doInsertMultipleRowsAt(int rowIndex, Object[] data)
          This method provides the ability to customize the logic behind insertMultipleRowsAt() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
protected abstract  boolean doInsertRowAt(int rowIndex, Object data)
          This method provides the ability to customize the logic behind insertRowAt() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
protected abstract  boolean doRemoveColumnAt(int columnIndex)
          This method provides the ability to customize the logic behind removeColumnAt() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
protected abstract  boolean doRemoveRowAt(int rowIndex)
          This method provides the ability to customize the logic behind removeRowAt() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
protected  boolean doRemoveRowRangeAt(int rowIndex, int rowCount)
          This method provides the ability to customize the logic behind removeRowAt() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
protected abstract  boolean doSetElement(int rowIndex, int columnIndex, Object data)
          This method provides the ability to customize the logic behind setElement() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well.
 Object getColumn(int columnIndex)
          Retrieves the array of elements at the specified column index.
 Object getElement(int rowIndex, int columnIndex)
          Retrieves the element at the specified row index and column index.
abstract  int getNumberOfColumns()
          Get the number of columns in the table.
abstract  int getNumberOfRows()
          Get the number of rows in the table.
 Object getRow(int rowIndex)
          Retrieves the array of elements at the specified row index.
 boolean implementationSupportsBatchOperations()
          Indicates whether this particular implementation supports aggregate batch operations using AbstractTableModel.addMultipleRows(Object[]), AbstractTableModel.insertMultipleRowsAt(int, Object[]) and AbstractTableModel.removeRowRangeAt(int, int).
 void insertColumnAt(int columnIndex, Object data)
          Inserts a column to the model at the specified index.
 void insertColumnAt(int columnIndex, Object data, boolean doNotifyListeners)
          Inserts a column to the model at the specified index.
 void insertMultipleRowsAt(int index, Object[] data)
          Inserts multiple rows to the model.
 void insertRowAt(int rowIndex, Object data)
          Inserts a row to the model at the specified index.
 void insertRowAt(int rowIndex, Object data, boolean doNotifyListeners)
          Inserts a row to the model at the specified index.
 void removeColumnAt(int columnIndex)
          Deletes a column from the model at the specified index.
 void removeColumnAt(int columnIndex, boolean doNotifyListeners)
          Deletes a column from the model at the specified index.
 void removeRowAt(int rowIndex)
          Deletes a row from the model at the specified index.
 void removeRowAt(int rowIndex, boolean doNotifyListeners)
          Deletes a row from the model at the specified index.
 void removeRowRangeAt(int rowIndex, int rowCount)
          Deletes a range of rows from the model at a specified index.
 void setElement(int rowIndex, int columnIndex, Object data)
          Sets the element at specified rowIndex and columnIndex.
 void setElement(int rowIndex, int columnIndex, Object data, boolean doNotifyListeners)
          Sets the element at specified rowIndex and columnIndex.
 
Methods inherited from class net.rim.device.api.ui.component.table.DataModel
modelReset, notifyListeners, registerListener, unregisterListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

AbstractTableModel

public AbstractTableModel()
Default constructor.

Since:
BlackBerry API 6.0.0


Method Detail

getColumn

public final Object getColumn(int columnIndex)
                       throws IllegalArgumentException
Retrieves the array of elements at the specified column index.

Parameters:
columnIndex - Column index to retrieve the elements from.
Returns:
Column at the specified index.
Throws:
IllegalArgumentException - If the index is invalid.
Since:
BlackBerry API 6.0.0

doGetColumn

protected abstract Object doGetColumn(int columnIndex)
This method provides the ability to customize the logic behind getColumn() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall getColumn() algorithm doesn’t change, while allowing key behavior to be configurable.

Parameters:
columnIndex - Column index to retreive the elements from.
Returns:
Column at the specified index.
Since:
BlackBerry API 6.0.0

getRow

public final Object getRow(int rowIndex)
                    throws IllegalArgumentException
Retrieves the array of elements at the specified row index.

Parameters:
rowIndex - Row index to retrieve the elements from.
Returns:
Row at the specified index.
Throws:
IllegalArgumentException - If the index is invalid.
Since:
BlackBerry API 6.0.0

doGetRow

protected abstract Object doGetRow(int rowIndex)
This method provides the ability to customize the logic behind getRow() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall getRow() algorithm doesn’t change, while allowing key behavior to be configurable.

Parameters:
rowIndex - Row index to retrieve the elements from.
Returns:
Row at the specified index.
Since:
BlackBerry API 6.0.0

getElement

public final Object getElement(int rowIndex,
                               int columnIndex)
                        throws IllegalArgumentException
Retrieves the element at the specified row index and column index.

Parameters:
rowIndex - Row index to retrieve the element from.
columnIndex - Column index to retrieve the elements from.
Returns:
Element at the specified indices.
Throws:
IllegalArgumentException - If the row index or column index is invalid.
Since:
BlackBerry API 6.0.0

doGetElement

protected abstract Object doGetElement(int rowIndex,
                                       int columnIndex)
This method provides the ability to customize the logic behind getElement() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall getElement() algorithm doesn’t change, while allowing key behavior to be configurable.

Parameters:
rowIndex - Row index to retrieve the element from.
columnIndex - Column index to retrieve the elements from.
Returns:
Element at the specified indices.
Since:
BlackBerry API 6.0.0

getNumberOfColumns

public abstract int getNumberOfColumns()
Get the number of columns in the table.

Returns:
the number of columns in the table.
Since:
BlackBerry API 6.0.0

getNumberOfRows

public abstract int getNumberOfRows()
Get the number of rows in the table.

Returns:
the number of rows in the table
Since:
BlackBerry API 6.0.0

addColumn

public final void addColumn(Object data,
                            boolean doNotifyListeners)
                     throws IllegalArgumentException
Add a column to the data model. A column must have an element for each row in the model, i.e. if there are multiple rows in the model then data needs to be an array of length AbstractTableModel.getNumberOfRows(). If there is 1 row then data can be any object. After the add is done the listeners are notified.

Parameters:
data - The column data to be added to the model.
doNotifyListeners - True if listeners should be notified of changes. False otherwise.
Throws:
IllegalArgumentException - If data is null or has invalid row count.
Since:
BlackBerry API 6.0.0

addColumn

public final void addColumn(Object data)
                     throws IllegalArgumentException
Add a column to the data model. A column must have an element for each row in the model, i.e. if there are multiple rows in the model then data needs to be an array of length AbstractTableModel.getNumberOfRows(). If there is 1 row then data can be any object. After the add is done the listeners are notified.

Parameters:
data - The column data to be added to the model.
Throws:
IllegalArgumentException - If data is null or has invalid row count.
See Also:
AbstractTableModel.addColumn(Object, boolean)
Since:
BlackBerry API 6.0.0

doAddColumn

protected abstract boolean doAddColumn(Object data)
This method provides the ability to customize the logic behind addColumn() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall addColumn() algorithm doesn’t change, while allowing key behavior to be configurable.

Parameters:
data - The column data to be added to the model.
Returns:
True if the column was added to the model. False otherwise.
Since:
BlackBerry API 6.0.0

addRow

public final void addRow(Object data,
                         boolean doNotifyListeners)
                  throws IllegalArgumentException
Add a row to the model. A row must have an element for each column in the model, i.e. if there are multiple columns in the model then data needs to be an array of length AbstractTableModel.getNumberOfColumns() if there is 1 column then element can be any object. After the add is done the listeners are notified.

Parameters:
data - The row data to be added to the model.
doNotifyListeners - True if listeners should be notified of changes. False otherwise.
Throws:
IllegalArgumentException - If data is null or has invalid column count.
Since:
BlackBerry API 6.0.0

implementationSupportsBatchOperations

public boolean implementationSupportsBatchOperations()
Indicates whether this particular implementation supports aggregate batch operations using AbstractTableModel.addMultipleRows(Object[]), AbstractTableModel.insertMultipleRowsAt(int, Object[]) and AbstractTableModel.removeRowRangeAt(int, int). This will determine whether these methods will perform operations as a contiguous operation, with a single notification event, or whether they will perform row-by-row operation with discrete notifications. Properly implementing these methods will provide significant performance improvements.

Returns:
True if these methods have provided an implementation.
Since:
BlackBerry API 7.0.0

addMultipleRows

public final void addMultipleRows(Object[] data)
                           throws IllegalArgumentException
Adds multiple rows to the model. Each row must have an element for each column in the model, i.e. for each element i in data, if there are multiple columns in the model then data[i] needs to be an array of length AbstractTableModel.getNumberOfColumns() if there is 1 column then the element can be any object. After the elements are added, the listeners are notified. The behaviour of this method depends on the return value of AbstractTableModel.implementationSupportsBatchOperations(). This method indicates whether a subclass has provided an implementation of the required methods: AbstractTableModel.doAddMultipleRows(Object[]), AbstractTableModel.doInsertMultipleRowsAt(int, Object[]) and AbstractTableModel.doRemoveRowRangeAt(int, int). If implementationSupportsBatchOperations() is true, then multiple rows can be added in a batch operation, with a single TableModelChangeEvent notification. Otherwise, each row is added individually with AbstractTableModel.addRow(Object), with a TableModelChangeEvent notification occurring for each row added. This will cause an incremental layout for each row added, compared to a single layout for classes which support batch operations.

Parameters:
data - The row data to be added to the model.
Throws:
IllegalArgumentException - If data is null or has invalid column count.
Since:
BlackBerry API 7.0.0

insertMultipleRowsAt

public final void insertMultipleRowsAt(int index,
                                       Object[] data)
Inserts multiple rows to the model. Each row must have an element for each column in the model. i.e. for each element i in data, if there are multiple columns in the model then data[i] needs to be an array of length AbstractTableModel.getNumberOfColumns() if there is one column then the element can be any object. After the elements are added, the listeners are notified. The behaviour of this method depends on the return value of AbstractTableModel.implementationSupportsBatchOperations(). This method indicates whether a subclass has provided an implementation of the required methods: AbstractTableModel.doAddMultipleRows(Object[]), AbstractTableModel.doInsertMultipleRowsAt(int, Object[]) and AbstractTableModel.doRemoveRowRangeAt(int, int). If implementationSupportsBatchOperations() is true, then multiple rows can be inserted in a batch operation, with a single TableModelChangeEvent notification. Otherwise, each row is inserted individually with AbstractTableModel.insertRowAt(int, Object), with a TableModelChangeEvent notification occurring for each row inserted. This will cause an incremental layout for each row inserted, compared to a single layout for classes which support batch operations.

Parameters:
index - The index for the start of the inserted
data - The row data to be added to the model.
Throws:
IllegalArgumentException - if data is null or has invalid column count.
Since:
BlackBerry API 7.0.0

addRow

public final void addRow(Object data)
                  throws IllegalArgumentException
Add a row to the model. A row must have an element for each column in the model, i.e. if there are multiple columns in the model then data needs to be an array of length AbstractTableModel.getNumberOfColumns() if there is 1 column then element can be any object. After the add is done the listeners are notified.

Parameters:
data - The row data to be added to the model.
Throws:
IllegalArgumentException - If data is null or has invalid column count.
See Also:
AbstractTableModel.addRow(Object, boolean)
Since:
BlackBerry API 6.0.0

doAddRow

protected abstract boolean doAddRow(Object data)
This method provides the ability to customize the logic behind addRow() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall addRow() algorithm doesn’t change, while allowing key behavior to be configurable.

Parameters:
data - The row data to be added to the model.
Returns:
True if the row was added to the model. False otherwise.
Since:
BlackBerry API 6.0.0

doAddMultipleRows

protected boolean doAddMultipleRows(Object[] data)
This method provides the ability to customize the logic behind addMultipleRows() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall addMultipleRows() algorithm doesn't change, while allowing key behavior to be configurable. The default behavior is not implemented. If this method returns false, the base implementation will insert the rows with multiple calls to addRow(). As such, implementations of doAddMultipleRows() should ensure that rows are added atomically.

Parameters:
data - The rows of data to be added to the model.
Returns:
True if all rows were added. False if no rows were added.
Since:
BlackBerry API 7.0.0

removeColumnAt

public final void removeColumnAt(int columnIndex,
                                 boolean doNotifyListeners)
                          throws IllegalArgumentException
Deletes a column from the model at the specified index. After the remove is done the listeners are notified.

Parameters:
columnIndex - Column index to delete the column at.
doNotifyListeners - True if listeners should be notified of changes. False otherwise.
Throws:
IllegalArgumentException - If columnIndex is invalid.
Since:
BlackBerry API 6.0.0

removeColumnAt

public final void removeColumnAt(int columnIndex)
                          throws IllegalArgumentException
Deletes a column from the model at the specified index. After the remove is done the listeners are notified.

Parameters:
columnIndex - Column index to delete the column at.
Throws:
IllegalArgumentException - If columnIndex is invalid.
See Also:
AbstractTableModel.removeColumnAt(int, boolean)
Since:
BlackBerry API 6.0.0

doRemoveColumnAt

protected abstract boolean doRemoveColumnAt(int columnIndex)
This method provides the ability to customize the logic behind removeColumnAt() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall removeColumnAt() algorithm doesn’t change, while allowing key behavior to be configurable.

Parameters:
columnIndex - The index of the column to be removed.
Returns:
True if the column was removed. False otherwise.
Since:
BlackBerry API 6.0.0

removeRowAt

public final void removeRowAt(int rowIndex,
                              boolean doNotifyListeners)
                       throws IllegalArgumentException
Deletes a row from the model at the specified index. After the remove is done the listeners are notified.

Parameters:
rowIndex - Row index to delete the row at.
doNotifyListeners - True if listeners should be notified of changes. False otherwise.
Throws:
IllegalArgumentException - If rowIndex is invalid.
Since:
BlackBerry API 6.0.0

removeRowAt

public final void removeRowAt(int rowIndex)
                       throws IllegalArgumentException
Deletes a row from the model at the specified index. After the remove is done the listeners are notified.

Parameters:
rowIndex - Row index to delete the row at.
Throws:
IllegalArgumentException - If rowIndex is invalid.
See Also:
AbstractTableModel.removeRowAt(int, boolean)
Since:
BlackBerry API 6.0.0

removeRowRangeAt

public final void removeRowRangeAt(int rowIndex,
                                   int rowCount)
                            throws IllegalArgumentException
Deletes a range of rows from the model at a specified index. After the elements are removed, the listeners are notified. The behaviour of this method depends on the return value of AbstractTableModel.implementationSupportsBatchOperations(). This method indicates whether a subclass has provided an implementation of the required methods: AbstractTableModel.doAddMultipleRows(Object[]), AbstractTableModel.doInsertMultipleRowsAt(int, Object[]) and AbstractTableModel.doRemoveRowRangeAt(int, int). If implementationSupportsBatchOperations() is true, then multiple rows can be removed in a batch operation, with a single TableModelChangeEvent notification. Otherwise, each row is removed individually with AbstractTableModel.removeRowAt(int), with a TableModelChangeEvent notification occurring for each row removed. This will cause an incremental layout for each row removed, compared to a single layout for classes which support batch operations.

Parameters:
rowIndex - the index of the start of the range to be deleted
rowCount - the number of elements to be deleted
Throws:
IllegalArgumentException - If rowIndex is invalid, or rowCount is invalid.
Since:
BlackBerry API 7.0.0

doRemoveRowAt

protected abstract boolean doRemoveRowAt(int rowIndex)
This method provides the ability to customize the logic behind removeRowAt() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall removeRowAt() algorithm doesn’t change, while allowing key behavior to be configurable.

Parameters:
rowIndex - The index of the row to be removed.
Returns:
True if the row was removed. False otherwise.
Since:
BlackBerry API 6.0.0

doRemoveRowRangeAt

protected boolean doRemoveRowRangeAt(int rowIndex,
                                     int rowCount)
This method provides the ability to customize the logic behind removeRowAt() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall removeRowAt() algorithm doesn't change, while allowing key behavior to be configurable.

Parameters:
rowIndex - Index of row to be removed.
rowCount - The number of rows to remove
Returns:
True if the rows were removed, false otherwise.
Since:
BlackBerry API 7.0.0

insertColumnAt

public final void insertColumnAt(int columnIndex,
                                 Object data,
                                 boolean doNotifyListeners)
                          throws IllegalArgumentException
Inserts a column to the model at the specified index.

Parameters:
columnIndex - Index at which to insert the column.
data - Column of data to be inserted.
doNotifyListeners - True if listeners should be notified. False otherwise.
Throws:
IllegalArgumentException - If columnIndex is invalid or data is invalid.
Since:
BlackBerry API 6.0.0

insertColumnAt

public final void insertColumnAt(int columnIndex,
                                 Object data)
                          throws IllegalArgumentException
Inserts a column to the model at the specified index.

Parameters:
columnIndex - Index at which to insert the column.
data - Column of data to be inserted.
Throws:
IllegalArgumentException - If columnIndex is invalid or data is invalid.
See Also:
AbstractTableModel.insertColumnAt(int, Object, boolean)
Since:
BlackBerry API 6.0.0

doInsertColumnAt

protected abstract boolean doInsertColumnAt(int columnIndex,
                                            Object data)
This method provides the ability to customize the logic behind insertColumnAt() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall insertColumnAt() algorithm doesn’t change, while allowing key behavior to be configurable.

Parameters:
columnIndex - Index at which to insert the column.
data - Column of data to be inserted.
Returns:
True if the column was inserted. False otherwise.
Since:
BlackBerry API 6.0.0

insertRowAt

public final void insertRowAt(int rowIndex,
                              Object data,
                              boolean doNotifyListeners)
                       throws IllegalArgumentException
Inserts a row to the model at the specified index.

Parameters:
rowIndex - Index at which to insert the row.
data - Row of data to be inserted.
doNotifyListeners - True if listeners should be notified. False otherwise.
Throws:
IllegalArgumentException - If rowIndex is invalid or data is invalid.
Since:
BlackBerry API 6.0.0

insertRowAt

public final void insertRowAt(int rowIndex,
                              Object data)
                       throws IllegalArgumentException
Inserts a row to the model at the specified index.

Parameters:
rowIndex - Index at which to insert the row.
data - Row of data to be inserted.
Throws:
IllegalArgumentException - If rowIndex is invalid or data is invalid.
See Also:
AbstractTableModel.insertRowAt(int, Object, boolean)
Since:
BlackBerry API 6.0.0

doInsertRowAt

protected abstract boolean doInsertRowAt(int rowIndex,
                                         Object data)
This method provides the ability to customize the logic behind insertRowAt() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall insertRowAt() algorithm doesn’t change, while allowing key behavior to be configurable.

Parameters:
rowIndex - Index at which to insert the column.
data - Column of data to be inserted.
Returns:
True if the column was inserted. False otherwise.
Since:
BlackBerry API 6.0.0

doInsertMultipleRowsAt

protected boolean doInsertMultipleRowsAt(int rowIndex,
                                         Object[] data)
This method provides the ability to customize the logic behind insertMultipleRowsAt() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall insertMultipleRowsAt() algorithm doesn't change, while allowing key behavior to be configurable.\ The default behaviour is not implemented. If this method returns false, the base implementation will insert the rows with multiple calls to insertRowAt(). As such, implementations of doInsertMultipleRowsAt() should ensure that rows are added atomically.

Parameters:
rowIndex - Index of row in which to insert.
data - Array of row data to insert
Returns:
False if no rows were added, true if all rows have been added.
Since:
BlackBerry API 7.0.0

setElement

public final void setElement(int rowIndex,
                             int columnIndex,
                             Object data,
                             boolean doNotifyListeners)
                      throws IllegalArgumentException
Sets the element at specified rowIndex and columnIndex.

Parameters:
rowIndex - Index of row in which to insert.
columnIndex - Index of column in which to insert.
data - Element of data to insert.
doNotifyListeners - True if listeners should be notified. False otherwise.
Throws:
IllegalArgumentException - If rowIndex is invalid or columnIndex is invalid.
Since:
BlackBerry API 6.0.0

setElement

public final void setElement(int rowIndex,
                             int columnIndex,
                             Object data)
                      throws IllegalArgumentException
Sets the element at specified rowIndex and columnIndex.

Parameters:
rowIndex - Index of row in which to insert.
columnIndex - Index of column in which to insert.
data - Element of data to insert.
Throws:
IllegalArgumentException - If rowIndex is invalid or columnIndex is invalid.
See Also:
AbstractTableModel.setElement(int, int, Object, boolean)
Since:
BlackBerry API 6.0.0

doSetElement

protected abstract boolean doSetElement(int rowIndex,
                                        int columnIndex,
                                        Object data)
This method provides the ability to customize the logic behind setElement() so that a developer can specify this behavior while still ensuring that necessary notification and exception handling overheads can occur as well. This way, the general structure of the overall setElement() algorithm doesn’t change, while allowing key behavior to be configurable.

Parameters:
rowIndex - Index of row in which to insert.
columnIndex - Index of column in which to insert.
data - Element of data to insert.
Returns:
True if the element was inserted. False otherwise.
Since:
BlackBerry API 6.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal