Class LongPressArgs

java.lang.Object
com.hp.lft.sdk.mobile.LongPressArgs

public class LongPressArgs extends Object
Arguments that define additional behavior for Long Press operations.
This class can be initialized using the builder pattern.
  • Constructor Summary

    Constructors
    Constructor
    Description
    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 Summary

    Modifier and Type
    Method
    Description
    double
    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 the Location 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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public String 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

      public LongPressArgs setGesture(String gesture)
      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

      public Location getLocation()
      Returns the Location to perform the long press.
      Default = center of the object
      Returns:
      the location to perform the long press.
    • setLocation

      public LongPressArgs setLocation(Location location)
      Sets the location to perform the long press.
      Parameters:
      location - the Location 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

      public LongPressArgs setDuration(double duration)
      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

      public LongPressArgs 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. (iOS Only)
      Parameters:
      numberOfTouchPoints - the number of points to press.
      Returns:
      the LongPressArgs instance with the updated state (builder pattern).