|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.ui.component.progressindicator.AbstractProgressIndicatorModel
public abstract class AbstractProgressIndicatorModel
This model represents the
data related to the progress being indicated. This model follows the
Model-View-Controller design pattern and is to be associated with
an AbstractProgressIndicatorView and an AbstractProgressIndicatorController.
This model represents a baseline for representing the model of progress.
It provides the ability to AbstractProgressIndicatorModel.cancel(), AbstractProgressIndicatorModel.reset(), and AbstractProgressIndicatorModel.resume().
It also allows for the association of an Adjustment in order
to process changes in the model's data.
In order to allow for multiple threads to handle the data related to progress, the related methods of this class are synchronized.
| Constructor Summary | ||
|---|---|---|
AbstractProgressIndicatorModel()
Constructs a new AbstractProgressIndicatorModel. |
||
| Method Summary | ||
|---|---|---|
void |
addListener(ProgressIndicatorListener listener)
Adds a listener to this data model. |
|
void |
cancel()
Cancels the current representation of progress. |
|
Adjustment |
getAdjustment()
Returns the Adjustment object assigned to this
model. |
|
AbstractProgressIndicatorController |
getController()
Returns the controller that has been associated with this model. |
|
abstract boolean |
isComplete()
Indicates whether or not the progress has reached completion. |
|
void |
removeAdjustment(Adjustment adjustment)
Removes the association with an Adjustment object. |
|
void |
removeListener(ProgressIndicatorListener listener)
Removes an associated ProgressIndicatorListener object. |
|
void |
reset()
Resets the data model to its initial state. |
|
void |
resume()
Resumes progress after the progress had been cancelled. |
|
void |
setAdjustment(Adjustment adjustment)
Associates an Adjustment object with this model. |
|
void |
setController(AbstractProgressIndicatorController controller)
Sets a controller for this model. |
|
void |
setNonProgrammaticValue(int value)
Sets a value such that every ProgressIndicatorListener
is notified that the update is from a non-programmatic source. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractProgressIndicatorModel()
AbstractProgressIndicatorModel.
| Method Detail |
|---|
public void addListener(ProgressIndicatorListener listener)
listener - The ProgressIndicatorListener to associate with this model.public void cancel()
public Adjustment getAdjustment()
Adjustment object assigned to this
model.
Adjustment object assigned to this data model,
null if none has been set.public AbstractProgressIndicatorController getController()
ProgressIndicatorController associated with this model,
null if none has been set.public abstract boolean isComplete()
true if the progress is complete, false otherwise.public void removeAdjustment(Adjustment adjustment)
Adjustment object.
The Adjustment is removed only if it matches the one provided.
adjustment - The Adjustment object to remove from this model.public void removeListener(ProgressIndicatorListener listener)
ProgressIndicatorListener object.
The listener is removed only if it matches the one provided.
listener - The ProgressIndicatorListener object to remove from this model.public void reset()
Adjustment object.
public void resume()
AbstractProgressIndicatorModel.cancel()public void setAdjustment(Adjustment adjustment)
Adjustment object with this model.
adjustment - The Adjustment object to associate with this model.public void setController(AbstractProgressIndicatorController controller)
controller - The ProgressIndicatorController to associate with this model.public void setNonProgrammaticValue(int value)
ProgressIndicatorListener
is notified that the update is from a non-programmatic source.
This is intended for use when the user changes the value.
The value assigned will be bounded by the current minimum and maximum values.
value - The new value for the model.
|
|||||||||
| 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.