|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.ui.component.table.DataModel
net.rim.device.api.ui.component.table.AbstractTableModel
net.rim.device.api.ui.component.table.TableModel
public class TableModel
Implemetation of AbstractTableModel that allows storage of any kind of data and supports all accessor/mutator methods.
Constructor Summary | ||
---|---|---|
TableModel()
Creates a new data model with zero rows and zero columns. |
||
TableModel(Object[][] elements)
Creates a new table model using the provided elements as the data. |
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. |
|
int |
getNumberOfColumns()
Get the number of columns in the table. |
|
int |
getNumberOfRows()
Get the number of rows in the table. |
Methods inherited from class net.rim.device.api.ui.component.table.AbstractTableModel |
---|
addColumn, addColumn, addRow, addRow, getColumn, getElement, getRow, insertColumnAt, insertColumnAt, insertRowAt, insertRowAt, removeColumnAt, removeColumnAt, removeRowAt, removeRowAt, 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 |
---|
public TableModel()
public TableModel(Object[][] elements)
Notifications are not sent out for elements that are added through the constructor.
elements
- Array of arrays representing a matrix to be inserted in
this data model.Method Detail |
---|
protected Object doGetColumn(int columnIndex)
AbstractTableModel
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.
doGetColumn
in class AbstractTableModel
columnIndex
- Column index to retreive the elements from.
AbstractTableModel.doGetColumn(int)
protected Object doGetRow(int rowIndex)
AbstractTableModel
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.
doGetRow
in class AbstractTableModel
rowIndex
- Row index to retrieve the elements from.
AbstractTableModel.doGetRow(int)
protected Object doGetElement(int rowIndex, int columnIndex)
AbstractTableModel
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.
doGetElement
in class AbstractTableModel
rowIndex
- Row index to retrieve the element from.columnIndex
- Column index to retrieve the elements from.
AbstractTableModel.doGetElement(int, int)
public int getNumberOfColumns()
AbstractTableModel
getNumberOfColumns
in class AbstractTableModel
AbstractTableModel.getNumberOfColumns()
public int getNumberOfRows()
AbstractTableModel
getNumberOfRows
in class AbstractTableModel
AbstractTableModel.getNumberOfRows()
protected boolean doAddColumn(Object data)
AbstractTableModel
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.
doAddColumn
in class AbstractTableModel
data
- The column data to be added to the model.
AbstractTableModel.addColumn(Object)
protected boolean doAddRow(Object data)
AbstractTableModel
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.
doAddRow
in class AbstractTableModel
AbstractTableModel.addRow(Object)
protected boolean doInsertColumnAt(int columnIndex, Object data)
AbstractTableModel
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.
doInsertColumnAt
in class AbstractTableModel
columnIndex
- Index at which to insert the column.data
- Column of data to be inserted.
AbstractTableModel.insertColumnAt(int, Object)
protected boolean doInsertRowAt(int rowIndex, Object data)
AbstractTableModel
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.
doInsertRowAt
in class AbstractTableModel
data
- Column of data to be inserted.
AbstractTableModel.insertRowAt(int, Object)
protected boolean doRemoveColumnAt(int columnIndex)
AbstractTableModel
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.
doRemoveColumnAt
in class AbstractTableModel
columnIndex
- The index of the column to be removed.
AbstractTableModel.removeColumnAt(int)
protected boolean doRemoveRowAt(int rowIndex)
AbstractTableModel
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.
doRemoveRowAt
in class AbstractTableModel
rowIndex
- The index of the row to be removed.
AbstractTableModel.removeRowAt(int)
protected boolean doSetElement(int rowIndex, int columnIndex, Object data)
AbstractTableModel
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.
doSetElement
in class AbstractTableModel
rowIndex
- Index of row in which to insert.columnIndex
- Index of column in which to insert.data
- Element of data to insert.
AbstractTableModel.setElement(int, int, Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.