Package com.hp.lft.sdk.mobile
Class LongPressArgs
java.lang.Object
com.hp.lft.sdk.mobile.LongPressArgs
Arguments that define additional behavior for Long Press operations.
This class can be initialized using the builder pattern.
This class can be initialized using the builder pattern.
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes a new instance of the LongPressArgs class with default arguments (perform one long press at the center of the object, at one touch point, for the default long press duration). -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the number of seconds to continue pressing.Returns the gesture class designed by the mobile application developer to handle this gesture on this object.Returns theLocation
to perform the long press.int
Returns the number of points to press, similar to the number of fingers you would use for the gesture on a real device.setDuration
(double duration) Sets the number of seconds to continue pressing.setGesture
(String gesture) Sets the gesture class designed by the mobile application developer to handle this gesture on this object.setLocation
(Location location) Sets the location to perform the long press.setNumberOfTouchPoints
(int numberOfTouchPoints) Sets the the number of points to press, similar to the number of fingers you would use for the gesture on a real device.
-
Constructor Details
-
LongPressArgs
public LongPressArgs()Initializes a new instance of the LongPressArgs class with default arguments (perform one long press at the center of the object, at one touch point, for the default long press duration).
-
-
Method Details
-
getGesture
Returns the gesture class designed by the mobile application developer to handle this gesture on this object. (iOS Only).
Needed only if the application developer overrode the default iOS gesture class.- Returns:
- the gesture class designed by the mobile application developer.
-
setGesture
Sets the gesture class designed by the mobile application developer to handle this gesture on this object. (iOS Only)
Needed only if the application developer overrode the default iOS gesture class.- Parameters:
gesture
- the gesture class designed by the mobile application developer.- Returns:
- the LongPressArgs instance with the updated state (builder pattern).
-
getLocation
Returns theLocation
to perform the long press.
Default = center of the object- Returns:
- the location to perform the long press.
-
setLocation
Sets the location to perform the long press.- Parameters:
location
- theLocation
to perform the long press on the object.- Returns:
- the LongPressArgs instance with the updated state (builder pattern).
-
getDuration
public double getDuration()Returns the number of seconds to continue pressing. (iOS Only)- Returns:
- the number of seconds to continue pressing.
-
setDuration
Sets the number of seconds to continue pressing. (iOS Only)- Parameters:
duration
- the number of seconds to continue pressing.- Returns:
- the LongPressArgs instance with the updated state (builder pattern).
-
getNumberOfTouchPoints
public int getNumberOfTouchPoints()Returns the number of points to press, similar to the number of fingers you would use for the gesture on a real device. (iOS Only)
Default = 1- Returns:
- the number of points to press.
-
setNumberOfTouchPoints
Sets the the number of points to press, similar to the number of fingers you would use for the gesture on a real device. (iOS Only)- Parameters:
numberOfTouchPoints
- the number of points to press.- Returns:
- the LongPressArgs instance with the updated state (builder pattern).
-