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

java.lang.Object
  extended by net.rim.device.api.ui.component.table.DataModel
      extended by net.rim.device.api.ui.component.table.AbstractTableModel
          extended by net.rim.device.api.ui.component.table.TableModelAdapter

public abstract class TableModelAdapter
extends AbstractTableModel

Abstract child class of AbstractTableModel that overrides all methods except for getNumberOfColumns() and getNumberOfRows(). Can be used to create adapters for displaying any type of data in a table.

Since:
BlackBerry API 6.0.0

Constructor Summary
TableModelAdapter()
           
 
Method Summary
protected  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 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  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  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  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  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 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  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  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 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.
 
Methods inherited from class net.rim.device.api.ui.component.table.AbstractTableModel
addColumn, addColumn, addMultipleRows, addRow, addRow, doAddMultipleRows, doInsertMultipleRowsAt, doRemoveRowRangeAt, getColumn, getElement, getNumberOfColumns, getNumberOfRows, getRow, implementationSupportsBatchOperations, insertColumnAt, insertColumnAt, insertMultipleRowsAt, insertRowAt, insertRowAt, removeColumnAt, removeColumnAt, removeRowAt, removeRowAt, removeRowRangeAt, setElement, setElement
 
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

TableModelAdapter

public TableModelAdapter()
Since:
BlackBerry API 6.0.0


Method Detail

doGetColumn

protected Object doGetColumn(int columnIndex)
Description copied from class: AbstractTableModel
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.

Specified by:
doGetColumn in class AbstractTableModel
Parameters:
columnIndex - Column index to retreive the elements from.
Returns:
Column at the specified index.
See Also:
AbstractTableModel.doGetColumn(int)
Since:
BlackBerry API 6.0.0

doGetRow

protected Object doGetRow(int rowIndex)
Description copied from class: AbstractTableModel
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.

Specified by:
doGetRow in class AbstractTableModel
Parameters:
rowIndex - Row index to retrieve the elements from.
Returns:
Row at the specified index.
See Also:
AbstractTableModel.doGetRow(int)
Since:
BlackBerry API 6.0.0

doGetElement

protected Object doGetElement(int rowIndex,
                              int columnIndex)
Description copied from class: AbstractTableModel
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.

Specified by:
doGetElement in class AbstractTableModel
Parameters:
rowIndex - Row index to retrieve the element from.
columnIndex - Column index to retrieve the elements from.
Returns:
Element at the specified indices.
See Also:
AbstractTableModel.doGetElement(int, int)
Since:
BlackBerry API 6.0.0

doAddColumn

protected boolean doAddColumn(Object data)
Description copied from class: AbstractTableModel
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.

Specified by:
doAddColumn in class AbstractTableModel
Parameters:
data - The column data to be added to the model.
Returns:
True if the column was added to the model. False otherwise.
See Also:
AbstractTableModel.doAddColumn(Object)
Since:
BlackBerry API 6.0.0

doAddRow

protected boolean doAddRow(Object Data)
Description copied from class: AbstractTableModel
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.

Specified by:
doAddRow in class AbstractTableModel
Parameters:
Data - The row data to be added to the model.
Returns:
True if the row was added to the model. False otherwise.
See Also:
AbstractTableModel.doAddRow(Object)
Since:
BlackBerry API 6.0.0

doRemoveColumnAt

protected boolean doRemoveColumnAt(int columnIndex)
Description copied from class: AbstractTableModel
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.

Specified by:
doRemoveColumnAt in class AbstractTableModel
Parameters:
columnIndex - The index of the column to be removed.
Returns:
True if the column was removed. False otherwise.
See Also:
AbstractTableModel.doRemoveColumnAt(int)
Since:
BlackBerry API 6.0.0

doRemoveRowAt

protected boolean doRemoveRowAt(int rowIndex)
Description copied from class: AbstractTableModel
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.

Specified by:
doRemoveRowAt in class AbstractTableModel
Parameters:
rowIndex - The index of the row to be removed.
Returns:
True if the row was removed. False otherwise.
See Also:
AbstractTableModel.doRemoveRowAt(int)
Since:
BlackBerry API 6.0.0

doInsertColumnAt

protected boolean doInsertColumnAt(int columnIndex,
                                   Object data)
Description copied from class: AbstractTableModel
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.

Specified by:
doInsertColumnAt in class AbstractTableModel
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.
See Also:
AbstractTableModel.doInsertColumnAt(int, Object)
Since:
BlackBerry API 6.0.0

doInsertRowAt

protected boolean doInsertRowAt(int rowIndex,
                                Object data)
Description copied from class: AbstractTableModel
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.

Specified by:
doInsertRowAt in class AbstractTableModel
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.
See Also:
AbstractTableModel.doInsertRowAt(int, Object)
Since:
BlackBerry API 6.0.0

doSetElement

protected boolean doSetElement(int rowIndex,
                               int columnIndex,
                               Object data)
Description copied from class: AbstractTableModel
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.

Specified by:
doSetElement in class AbstractTableModel
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.
See Also:
AbstractTableModel.doSetElement(int, int, Object)
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