Package com.luciad.input
Class ScrollEvent
java.lang.Object
com.luciad.input.ScrollEvent
- All Implemented Interfaces:
IInputEvent
,AutoCloseable
Implementation of
IInputEvent
that represents a scroll gesture (for example using the mouse wheel).
This class contains the location, the scroll amount and direction and modifiers if any.
-
Constructor Summary
ConstructorDescriptionScrollEvent
(Coordinate location, ModifierKeys modifierKeys, double deltaY) Creates a scroll event. -
Method Summary
-
Constructor Details
-
ScrollEvent
Creates a scroll event.- Parameters:
location
- The location of the event, defined in device independent pixels.modifierKeys
- The modifiers of the event.deltaY
- the vertical scroll amount and direction.
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
getLocation
Returns the position of the event.It is expressed in device independent pixel coordinates with top-left corner of the map being the (0,0) position.
- Returns:
- the position of the event.
-
getModifierKeys
Returns the modifiers of the event.- Returns:
- the modifiers of the event.
-
getDeltaY
public double getDeltaY()Returns the vertical scroll amount and direction.A positive value indicates scrolling up, a negative value indicates scrolling down.
A delta of 1.0 (or -1.0) should be interpreted as follows:
- for mouse wheels, this would correspond to 1 tick, typically 15 degrees of rotation
- for other devices, this would correspond to 10 pixels (device independent pixels)
- Returns:
- the vertical scroll amount and scroll direction.
-