public interface GestureCapable
T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DURATION_MS |
static String |
GESTURE_MOVE |
static String |
GESTURE_PRESS |
static String |
GESTURE_RELEASE |
static int |
MAX_FINGERS |
static int |
MIN_DURATION_MS |
static int |
MOVE_LOOPS |
static String |
PARAM_EVENT |
static String |
PARAM_FINGER |
static String |
PARAM_TO |
static int |
STEP_DELAY_MS |
Modifier and Type | Method and Description |
---|---|
void |
checkSupported()
Check if gestures are supported.
|
int |
getMaxFingers()
Get the maximum number of fingers supported by the device.
|
boolean |
isAsynchronous()
Indicate whether the gesture is performed synchronously (false) or
asynchronously (true).
|
void |
performGesture(List<Map> params,
Dimension screenSize,
int durationMs)
Perform the gesture.
|
static final int MAX_FINGERS
static final int MOVE_LOOPS
static final int STEP_DELAY_MS
static final int DEFAULT_DURATION_MS
static final int MIN_DURATION_MS
static final String GESTURE_PRESS
static final String GESTURE_MOVE
static final String GESTURE_RELEASE
static final String PARAM_EVENT
static final String PARAM_FINGER
static final String PARAM_TO
void checkSupported() throws UnsupportedOperationException
UnsupportedOperationException
- if gestures are not supported by
the implementing class.int getMaxFingers()
boolean isAsynchronous()
void performGesture(List<Map> params, Dimension screenSize, int durationMs) throws IOException
params
- gesture parameters. It is a list of steps. Each step is a
map which specifies the finger ID (PARAM_EVENT
having one of the
PARAM_FINGER
values), the action type (GESTURE_MOVE
, GESTURE_PRESS
,
GESTURE_RELEASE
)and the target location (PARAM_TO
).screenSize
- the current client screen size. It is used to resolve
relative coordinates given as percentages.durationMs
- gesture duration in milliseconds.IOException
- on an I/O error.