Package com.hp.lft.sdk.web
Class WebPinchArgs
java.lang.Object
com.hp.lft.sdk.web.WebPinchArgs
Arguments that define additional behavior for Pinch operations.
This class can be initialized using the builder pattern.
This class can be initialized using the builder pattern.
-
Constructor Summary
ConstructorsConstructorDescriptionWebPinchArgs
(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 TypeMethodDescriptiondouble
Returns the number of seconds to perform the pinch.Returns the location for the center of the Pinch operation.double
getScale()
Returns the scale for the the Pinch operation.setDuration
(double duration) Sets the number of seconds to to perform the pinch.setLocation
(Location location) Sets the location for the center of the pinch.setScale
(double scale) Sets the scale for the the pinch.
-
Constructor Details
-
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 Details
-
getScale
public double getScale()Returns the scale for the the Pinch operation.- Returns:
- the location for the center of the pinch.
-
setScale
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
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
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
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).
-