|
|||||||||
| 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
public abstract class DataModel
A data model for list or table components. Implementations of DataModel provide a representation of the data to be displayed in the view, e.g. concrete data structures, or data access logic to databases. It should handle requests from the controller or other sources and subsequently notify the any additional listeners of the model. Views are automatically registered as listeners. This interface provides functionality to register and unregister listeners, and notify all listeners of a reset.
| Constructor Summary | ||
|---|---|---|
DataModel()
Creates a DataModel instance. |
||
| Method Summary | ||
|---|---|---|
void |
modelReset()
Send a notification to all the listeners that the contents of the model have changed considerably A DataModelChangeEvent.MODEL_RESET event will be sent to all listeners. |
|
protected void |
notifyListeners(DataModelChangeEvent event)
Send a notification to all the listeners that an event has occurred. |
|
void |
registerListener(DataModelListener listener)
Register a listener to listen for changes to the data model. |
|
boolean |
unregisterListener(DataModelListener listener)
Unregister a listener from this data model. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DataModel()
| Method Detail |
|---|
protected void notifyListeners(DataModelChangeEvent event)
event - An object containing all the information about the event that has occured.DataModelListener.modelChanged(net.rim.device.api.ui.component.table.DataModelChangeEvent)public void registerListener(DataModelListener listener)
listener - DataModelListener to register to this data model.
NullPointerException - If listener is null.public boolean unregisterListener(DataModelListener listener)
listener - DataModelListener to unregister from this data model.
true if listener was a registered
listener (and successfully removed); otherwise false.
NullPointerException - If listener is null
.public void modelReset()
DataModelChangeEvent.MODEL_RESET event will be sent to all listeners.
DataModelListener.modelChanged(net.rim.device.api.ui.component.table.DataModelChangeEvent)
|
|||||||||
| 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.