Constructs a MouseWheelEvent
object with the specified
source component, type, modifiers, coordinates, absolute coordinates,
scroll type, scroll amount, and wheel rotation.
Note that passing in an invalid id
parameter results
in unspecified behavior. This method throws an
IllegalArgumentException
if source
equals
null
.
Even if inconsistent values for relative and absolute coordinates
are passed to the constructor, a MouseWheelEvent
instance
is still created and no exception is thrown.
source | the Component that originated the event | |
id | the integer value that identifies the event | |
when | a long value that gives the time when the event occurred | |
modifiers | the modifier keys down during event (shift, ctrl, alt, meta) | |
x | the horizontal x coordinate for the
mouse location | |
y | the vertical y coordinate for the
mouse location | |
xAbs | the absolute horizontal x coordinate for
the mouse location | |
yAbs | the absolute vertical y coordinate for
the mouse location | |
clickCount | the number of mouse clicks associated with the event | |
popupTrigger | a boolean value, true if this event is a trigger
for a popup-menu | |
scrollType | the type of scrolling which should take place in
response to this event; valid values are
WHEEL_UNIT_SCROLL and
WHEEL_BLOCK_SCROLL | |
scrollAmount | for scrollType WHEEL_UNIT_SCROLL ,
the number of units to be scrolled | |
wheelRotation | the integer number of "clicks" by which the mouse wheel was rotated | |
preciseWheelRotation | the double number of "clicks" by which the mouse wheel was rotated |
IllegalArgumentException | if source is null |
MouseEvent.MouseEvent(java.awt.Component, int, long, int, int, int, int, boolean), MouseEvent.MouseEvent(java.awt.Component, int, long, int, int, int, int, int, int, boolean, int)
Diagram: Event Hierarchy Expanded