buoy.event

Class MouseScrolledEvent

Implemented Interfaces:
WidgetEvent

public class MouseScrolledEvent
extends MouseWheelEvent
implements WidgetEvent

This class defines an event caused by rotating the scroll wheel on a mouse.
Author:
Peter Eastman

Constructor Summary

MouseScrolledEvent(Widget source, long when, int modifiers, int x, int y, int scrollType, int scrollAmount, int wheelRotation)
Create a MouseScrolledEvent.

Method Summary

Object
getSource()
Get the object which generated this event.
Widget
getWidget()
Get the Widget which generated this event.

Constructor Details

MouseScrolledEvent

public MouseScrolledEvent(Widget source,
                          long when,
                          int modifiers,
                          int x,
                          int y,
                          int scrollType,
                          int scrollAmount,
                          int wheelRotation)
Create a MouseScrolledEvent.
Parameters:
source - the Widget which generated this event
when - the time at which the event occurred
modifiers - describes the state of various keys and buttons at the time when the event occurred (a sum of the constants defined by InputEvent)
x - the x coordinate at which the event occurred
y - the y coordinate at which the event occurred
scrollType - the type of scrolling which should occur in response to this event (either WHEEL_UNIT_SCROLL or WHEEL_BLOCK_SCROLL)
scrollAmount - the number of units which should be scrolled in response to this event
wheelRotation - the total distance the mouse wheel was rotated

Method Details

getSource

public Object getSource()
Get the object which generated this event.

getWidget

public Widget getWidget()
Get the Widget which generated this event.
Specified by:
getWidget in interface WidgetEvent

Written by Peter Eastman.