public interface MultiPointerTransferCapable extends Capability
T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
Modifier and Type | Method and Description |
---|---|
void |
checkDistances(Point center,
int[] distances,
boolean pinch)
Check if the argument the distances can be used to perform the specified
action.
|
void |
getDefaultParameters(Point center,
int[] distances)
Get the default zoom/pinch parameters.
|
boolean |
isServerSideZoomSupported(String[] reason)
Indicate whether the zoom/pinch events are supported.
|
void |
sendZoomEvent(int centerX,
int centerY,
int startDistance,
int endDistance,
int durationMs,
int stepMs)
Perform the zoom or pinch event.The event type is derived from the
distance arguments where the pinch is when the start distance is greater
than the end one and zoom is vice versa.
|
boolean isServerSideZoomSupported(String[] reason)
reason
- optional array of length >= 1. If the method returns false
it may store a reason or an error message at index 0.void sendZoomEvent(int centerX, int centerY, int startDistance, int endDistance, int durationMs, int stepMs) throws IOException
centerX
- the center X coordinatecenterY
- the center Y coordinatestartDistance
- the start distanceendDistance
- the end distancedurationMs
- duration of the zomm/pinch in milliseconds (usually
1000 ms aka 1 second)stepMs
- delay among the drag events in milliseconds (usually 100
ms)IOException
- on an I/O error.void getDefaultParameters(Point center, int[] distances)
center
- if the argument x, y coordinates are set to a negative
value it will be populated with the default center point. If it contains
valid coordinates they will not be updated but used for calculation of
the default distances.distances
- an output array with the minimum length of 2 to write
the lower (index 0) and higher (1) distances to.void checkDistances(Point center, int[] distances, boolean pinch) throws IllegalArgumentException
center
- the current center point.distances
- the array of distances (min length of 2) where the lower
distance is at the index of 0.pinch
- indicates whether the target action is a pinch (true) or a
zoom (false).IllegalArgumentException