Share this page

com.hp.lft.sdk.web

## Class WebPinchArgs

- java.lang.Object
- - com.hp.lft.sdk.web.WebPinchArgs

-     public class WebPinchArgs
      extends java.lang.Object

  Arguments that define additional behavior for Pinch operations.
  This class can be initialized using the builder pattern.

- - ### Constructor Summary

    Constructor and Description
    `WebPinchArgs(double scale)` Initializes a new instance of the WebPinchArgs class with default arguments (pinch at the center of the object for 1 second).

  - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `double` | `getDuration()` Returns the number of seconds to perform the pinch.
    `Location` | `getLocation()` Returns the location for the center of the Pinch operation.
    `double` | `getScale()` Returns the scale for the the Pinch operation.
    `WebPinchArgs` | `setDuration(double duration)` Sets the number of seconds to to perform the pinch.
    `WebPinchArgs` | `setLocation(Location location)` Sets the location for the center of the pinch.
    `WebPinchArgs` | `setScale(double scale)` Sets the scale for the the pinch.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WebPinchArgs

          public WebPinchArgs(double scale)

      Initializes a new instance of the WebPinchArgs class with default arguments (pinch at the center of the object for 1 second).
      Parameters:
        `scale` - the zoom scale resulting from the pinch gesture. This number is the ratio between the start distance and the end distance between the two touch point used for the pinch.
        For example, if you were to touch a screen with your fingers 6 cm apart, and pinch until your fingers were 3 cm, apart, the scale would be 0.5. Likewise, if your fingers were 3 cm apart, and you pinch until your fingers are 6 cm apart, the scale would be 2.

  - ### Method Detail

    - #### getScale

          public double getScale()

      Returns the scale for the the Pinch operation.
      Returns:
        the location for the center of the pinch.

    - #### setScale

          public WebPinchArgs setScale(double scale)

      Sets the scale for the the pinch.
      Parameters:
        `scale` - the zoom scale for the the pinch.
      Returns:
        the WebPinchArgs instance with the updated state (builder pattern).

    - #### getLocation

          public Location getLocation()

      Returns the location for the center of the Pinch operation. Possible values: `Location`
      Default value = center of the object
      Returns:
        the location for the center of the pinch.

    - #### setLocation

          public WebPinchArgs setLocation(Location location)

      Sets the location for the center of the pinch.
      Parameters:
        `location` - the location for the center of the pinch. Possible values: `Location`.
      Returns:
        the WebPinchArgs instance with the updated state (builder pattern).

    - #### getDuration

          public double getDuration()

      Returns the number of seconds to perform the pinch.
      Returns:
        the number of seconds to perform the pinch

    - #### setDuration

          public WebPinchArgs setDuration(double duration)

      Sets the number of seconds to to perform the pinch.
      Parameters:
        `duration` - the number of seconds to to perform the pinch
      Returns:
        the WebPinchArgs instance with the updated state (builder pattern).

Tips to improve your search results... UFT Developer Java SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: