Class MouseWheelEvent
java.lang.Object
java.util.EventObject
java.awt.AWTEvent
vaadinx.awt.event.ComponentEvent
vaadinx.awt.event.InputEvent
vaadinx.awt.event.MouseEvent
vaadinx.awt.event.MouseWheelEvent
- All Implemented Interfaces:
Serializable
Port of
MouseWheelEvent. Extends our
MouseEvent — carries scroll type, scroll amount, integer rotation,
and high-precision rotation (smooth-scrolling wheels).- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class MouseEvent
BUTTON1, BUTTON2, BUTTON3, MOUSE_CLICKED, MOUSE_DRAGGED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_FIRST, MOUSE_LAST, MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_WHEEL, NOBUTTONFields inherited from class 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_MASKFields inherited from class ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWNFields inherited from class AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, 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_MASKFields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionMouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation) MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation) MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation, double preciseWheelRotation) -
Method Summary
Modifier and TypeMethodDescriptiondoubleintintintHow far each click of the wheel should scroll if the current scroll type is WHEEL_UNIT_SCROLL.intMethods inherited from class MouseEvent
getButton, getClickCount, getLocationOnScreen, getMouseModifiersText, getPoint, getX, getXOnScreen, getY, getYOnScreen, isPopupTrigger, translatePointMethods inherited from class InputEvent
consume, getMaskForButton, getModifiers, getModifiersEx, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDownMethods inherited from class ComponentEvent
getComponentMethods inherited from class EventObject
getSource
-
Field Details
-
WHEEL_UNIT_SCROLL
public static final int WHEEL_UNIT_SCROLL- See Also:
-
WHEEL_BLOCK_SCROLL
public static final int WHEEL_BLOCK_SCROLL- See Also:
-
-
Constructor Details
-
MouseWheelEvent
public MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation) -
MouseWheelEvent
public MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation) -
MouseWheelEvent
public MouseWheelEvent(Component source, int id, long when, int modifiers, int x, int y, int xAbs, int yAbs, int clickCount, boolean popupTrigger, int scrollType, int scrollAmount, int wheelRotation, double preciseWheelRotation)
-
-
Method Details
-
getScrollType
public int getScrollType() -
getScrollAmount
public int getScrollAmount() -
getWheelRotation
public int getWheelRotation() -
getPreciseWheelRotation
public double getPreciseWheelRotation() -
getUnitsToScroll
public int getUnitsToScroll()How far each click of the wheel should scroll if the current scroll type is WHEEL_UNIT_SCROLL. AWT returns a computed value from the underlying component's scroll unit; we return the raw scrollAmount * rotation so callers get the same "total units" semantics. -
paramString
- Overrides:
paramStringin classMouseEvent
-