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
The "anti-clockwise" command constant.
|
static int |
BACK
The "back" command constant.
|
static int |
CANCEL
The "cancel" command constant.
|
static int |
CLOCKWISE
The "clockwise" command constant.
|
static int |
COPY
The "copy" command constant.
|
static int |
CUT
The "cut" command constant.
|
static int |
DISPLAY
The "display" command constant.
|
static int |
DOWN
The "down" command constant.
|
static int |
ESC
The "escape" command constant.
|
static int |
EXIT
The "exit" command constant.
|
static int |
HELP
The "help" command constant.
|
static int |
LEFT
The "left" command constant.
|
static int |
MENU
The "menu" command constant.
|
static int |
NEXT
The "next" command constant.
|
static int |
PASTE
The "paste" command constant.
|
static int |
PAUSE
The "pause" command constant.
|
static int |
PREVIOUS
The "previous" command constant.
|
static int |
RESUME
The "resume" command constant.
|
static int |
RIGHT
The "right" command constant.
|
static int |
SELECT
The "select" command constant.
|
static int |
START
The "start" command constant.
|
static int |
STOP
The "stop" command constant.
|
static int |
UP
The "up" command constant.
|
Constructor and Description |
---|
Command()
Creates a new command event generator.
|
Modifier and Type | Method and Description |
---|---|
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, getList, removeFromSystemPool, sendEvent, setEventHandler
public static final int ESC
public static final int BACK
public static final int UP
public static final int DOWN
public static final int LEFT
public static final int RIGHT
public static final int SELECT
public static final int CANCEL
public static final int HELP
public static final int MENU
public static final int EXIT
public static final int START
public static final int STOP
public static final int PAUSE
public static final int RESUME
public static final int COPY
public static final int CUT
public static final int PASTE
public static final int CLOCKWISE
public static final int ANTICLOCKWISE
public static final int PREVIOUS
public static final int NEXT
public static final int DISPLAY
public int getEventType()
Event.COMMAND
.getEventType
in class EventGenerator
public void send(int command)
command
- the command to be sent