buoy.event
Class MouseScrolledEvent

java.lang.Object
  extended by java.util.EventObject
      extended by java.awt.AWTEvent
          extended by java.awt.event.ComponentEvent
              extended by java.awt.event.InputEvent
                  extended by java.awt.event.MouseEvent
                      extended by java.awt.event.MouseWheelEvent
                          extended by buoy.event.MouseScrolledEvent
All Implemented Interfaces:
WidgetEvent, java.io.Serializable

public class MouseScrolledEvent
extends java.awt.event.MouseWheelEvent
implements WidgetEvent

This class defines an event caused by rotating the scroll wheel on a mouse.

Author:
Peter Eastman
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.awt.event.MouseWheelEvent
WHEEL_BLOCK_SCROLL, WHEEL_UNIT_SCROLL
 
Fields inherited from class java.awt.event.MouseEvent
BUTTON1, BUTTON2, BUTTON3, MOUSE_CLICKED, MOUSE_DRAGGED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_FIRST, MOUSE_LAST, MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_WHEEL, NOBUTTON
 
Fields inherited from class java.awt.event.InputEvent
ALT_DOWN_MASK, ALT_GRAPH_DOWN_MASK, ALT_GRAPH_MASK, ALT_MASK, BUTTON1_DOWN_MASK, BUTTON1_MASK, BUTTON2_DOWN_MASK, BUTTON2_MASK, BUTTON3_DOWN_MASK, BUTTON3_MASK, CTRL_DOWN_MASK, CTRL_MASK, META_DOWN_MASK, META_MASK, SHIFT_DOWN_MASK, SHIFT_MASK
 
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
 
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
 
Constructor Summary
MouseScrolledEvent(Widget source, long when, int modifiers, int x, int y, int scrollType, int scrollAmount, int wheelRotation)
          Create a MouseScrolledEvent.
 
Method Summary
 java.lang.Object getSource()
          Get the object which generated this event.
 Widget getWidget()
          Get the Widget which generated this event.
 
Methods inherited from class java.awt.event.MouseWheelEvent
getScrollAmount, getScrollType, getUnitsToScroll, getWheelRotation, paramString
 
Methods inherited from class java.awt.event.MouseEvent
getButton, getClickCount, getMouseModifiersText, getPoint, getX, getY, isPopupTrigger, translatePoint
 
Methods inherited from class java.awt.event.InputEvent
consume, getModifiers, getModifiersEx, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown
 
Methods inherited from class java.awt.event.ComponentEvent
getComponent
 
Methods inherited from class java.awt.AWTEvent
getID, setSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

getSource

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

Overrides:
getSource in class java.util.EventObject

getWidget

public Widget getWidget()
Get the Widget which generated this event.

Specified by:
getWidget in interface WidgetEvent


Written by Peter Eastman.