public class Command extends EventGenerator
This class defines constants for a set of basic commands. The commands defined in this class are typical application-level effects of input events. The advantage of using commands rather than specific input events in an application is that the application can be more portable: it is not tied to specific input devices.
Modifier and Type | Field and Description |
---|---|
static int |
ANTICLOCKWISE
Constant for "anti-clockwise" command.
|
static int |
BACK
Constant for "back" command.
|
static int |
CANCEL
Constant for "cancel" command.
|
static int |
CLOCKWISE
Constant for "clockwise" command.
|
static int |
COPY
Constant for "copy" command.
|
static int |
CUT
Constant for "cut" command.
|
static int |
DISPLAY
Constant for "display" command.
|
static int |
DOWN
Constant for "down" command.
|
static int |
ESC
Constant for "escape" command.
|
static int |
EVENT_TYPE
The COMMAND event type returned by
getEventType() . |
static int |
EXIT
Constant for "exit" command.
|
static int |
HELP
Constant for "help" command.
|
static int |
LEFT
Constant for "left" command.
|
static int |
MENU
Constant for "menu" command.
|
static int |
NEXT
Constant for "next" command.
|
static int |
PASTE
Constant for "paste" command.
|
static int |
PAUSE
Constant for "pause" command.
|
static int |
PREVIOUS
Constant for "previous" command.
|
static int |
RESUME
Constant for "resume" command.
|
static int |
RIGHT
Constant for "right" command.
|
static int |
SELECT
Constant for "select" command.
|
static int |
START
Constant for "start" command.
|
static int |
STOP
Constant for "stop" command.
|
static int |
UP
Constant for "up" command.
|
Constructor and Description |
---|
Command()
Creates a new command event generator.
|
Modifier and Type | Method and Description |
---|---|
int |
buildEvent(int command)
Builds a MicroUI event for the given command.
|
int |
getEventType()
Gets the event generator's type.
|
void |
send(int command)
Sends the given command to the event generator's listener
|
addToSystemPool, get, get, get, getEventHandler, getId, removeFromSystemPool, sendEvent, setEventHandler
public static final int ANTICLOCKWISE
public static final int BACK
public static final int CANCEL
public static final int CLOCKWISE
public static final int COPY
public static final int CUT
public static final int DISPLAY
public static final int DOWN
public static final int ESC
public static final int EVENT_TYPE
getEventType()
.public static final int EXIT
public static final int HELP
public static final int LEFT
public static final int MENU
public static final int NEXT
public static final int PASTE
public static final int PAUSE
public static final int PREVIOUS
public static final int RESUME
public static final int RIGHT
public static final int SELECT
public static final int START
public static final int STOP
public static final int UP
public int buildEvent(int command)
command
- the command to be sentpublic int getEventType()
EVENT_TYPE
.getEventType
in class EventGenerator
public void send(int command)
command
- the command to be sent