|
|||||||||
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.AbstractProgressIndicatorController
public abstract class AbstractProgressIndicatorController
This class acts as a controller for an AbstractProgressIndicatorView
based on the Model-View-Controller design pattern. This controller
is responsible for the customized handling of input to the view
(but note that this controller does not process trackwheel events).
This controller can be associated with both an AbstractProgressIndicatorView
and an AbstractProgressIndicatorModel
.
This class implements the following input-handling methods, which mirror those found in Field
:
AbstractProgressIndicatorController.keyChar(char, int, int)
, AbstractProgressIndicatorController.keyControl(char, int, int)
, AbstractProgressIndicatorController.keyDown(int, int)
, AbstractProgressIndicatorController.keyRepeat(int, int)
,
AbstractProgressIndicatorController.keyUp(int, int)
, AbstractProgressIndicatorController.navigationClick(int, int)
, AbstractProgressIndicatorController.navigationMovement(int, int, int, int)
, and AbstractProgressIndicatorController.touchEvent(net.rim.device.api.ui.TouchEvent)
.
The default behavior provided by this class is to not process or consume any input event.
That is, all the above input-handling methods in this class return false
.
Because of this, ProgressIndicatorView
allows its delegate to process them. Override these
methods in order to provide customized input-handling behavior.
Constructor Summary | ||
---|---|---|
AbstractProgressIndicatorController()
Constructs a new AbstractProgressIndicatorController . |
Method Summary | ||
---|---|---|
AbstractProgressIndicatorModel |
getModel()
Returns the model associated with this controller. |
|
AbstractProgressIndicatorView |
getView()
Returns the view associated with this controller. |
|
boolean |
keyChar(char ch,
int status,
int time)
Implementation of Field.keyChar(char,int,int) . |
|
boolean |
keyControl(char ch,
int status,
int time)
Implementation of Field.keyControl(char,int,int) . |
|
boolean |
keyDown(int keycode,
int time)
Implementation of Field.keyDown(int,int) . |
|
boolean |
keyRepeat(int keycode,
int time)
Implementation of Field.keyRepeat(int,int) . |
|
boolean |
keyStatus(int keycode,
int time)
Implementation of Field.keyStatus(int,int) . |
|
boolean |
keyUp(int keycode,
int time)
Implementation of Field.keyUp(int,int) . |
|
boolean |
navigationClick(int status,
int time)
Implementation of Field.navigationClick(int,int) . |
|
boolean |
navigationMovement(int dx,
int dy,
int status,
int time)
Implementation of Field.navigationMovement(int,int,int,int) . |
|
void |
setModel(AbstractProgressIndicatorModel model)
Associates this controller with the provided model. |
|
void |
setView(AbstractProgressIndicatorView view)
Associates this controller with the provided view. |
|
boolean |
touchEvent(TouchEvent message)
Implementation of Field.touchEvent(TouchEvent) . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractProgressIndicatorController()
AbstractProgressIndicatorController
.
Method Detail |
---|
public AbstractProgressIndicatorModel getModel()
ProgressIndicatorModel
that is associated with this controller,
null
if none has been set.public AbstractProgressIndicatorView getView()
ProgressIndicatorView
that is associated with this controller,
null
if none has been set.public boolean keyChar(char ch, int status, int time)
Field.keyChar(char,int,int)
.
ch
- Character generated.status
- Modifier key status.time
- Number of milliseconds since the device was turned on.
true
if the event was consumed, false
otherwise.public boolean keyControl(char ch, int status, int time)
Field.keyControl(char,int,int)
.
ch
- Character generated.status
- Modifier key status.time
- Number of milliseconds since the device was turned on.
true
if the event was consumed, false
otherwise.public boolean keyDown(int keycode, int time)
Field.keyDown(int,int)
.
keycode
- Code of key pressed.time
- Number of milliseconds since the device was turned on.
true
if the event was consumed, false
otherwise.public boolean keyRepeat(int keycode, int time)
Field.keyRepeat(int,int)
.
keycode
- Code of key repeated.time
- Number of milliseconds since the device was turned on.
true
if the event was consumed, false
otherwise.public boolean keyStatus(int keycode, int time)
Field.keyStatus(int,int)
.
keycode
- Code of status key.time
- Number of milliseconds since the device was turned on.
public boolean keyUp(int keycode, int time)
Field.keyUp(int,int)
.
keycode
- Code of key released.time
- Number of milliseconds since the device was turned on.
true
if the event was consumed, false
otherwise.public boolean navigationClick(int status, int time)
Field.navigationClick(int,int)
.
status
- Bitfield of values defined by KeypadListener
.time
- Number of milliseconds since the device was turned on.
true
if the event was consumed, false
otherwise.public boolean navigationMovement(int dx, int dy, int status, int time)
Field.navigationMovement(int,int,int,int)
.
dx
- Magnitude of navigational motion: negative for a move left
and postive for a move right.dy
- Magnitude of navigational motion: negative for an upwards
move, and positive for a downwards move.status
- Bitfield of values defined by KeypadListener
.time
- Number of milliseconds since the device was turned on.
true
if the event was consumed, false
otherwise.public void setModel(AbstractProgressIndicatorModel model)
model
- The ProgressIndicatorModel
to associate with this controller.public void setView(AbstractProgressIndicatorView view)
view
- The ProgressIndicatorView
to associate with this controller.public boolean touchEvent(TouchEvent message)
Field.touchEvent(TouchEvent)
.
message
- TouchEvent
object containing various input parameters
including the event type and touch coordinates.
true
if the event was consumed, false
otherwise.
IllegalArgumentException
- if message
is null
.
|
|||||||||
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.