Package io.guise.framework.event
Class AbstractMouseEvent
java.lang.Object
java.util.EventObject
com.globalmentor.event.AbstractEvent
io.guise.framework.event.AbstractGuiseEvent
io.guise.framework.event.AbstractInputEvent
io.guise.framework.event.AbstractGestureInputEvent
io.guise.framework.event.AbstractMouseEvent
- All Implemented Interfaces:
com.globalmentor.event.Event
,com.globalmentor.event.TargetedEvent
,GestureInputEvent
,GuiseEvent
,InputEvent
,MouseEvent
,Serializable
- Direct Known Subclasses:
MouseClickEvent
,MouseEnterEvent
,MouseExitEvent
An abstract event providing mouse input information.
- Author:
- Garret Wilson
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class io.guise.framework.event.AbstractGestureInputEvent
getKeys, hasAltKey, hasControlKey, hasShiftKey
Methods inherited from class io.guise.framework.event.AbstractInputEvent
consume, isConsumed
Methods inherited from class io.guise.framework.event.AbstractGuiseEvent
getSession
Methods inherited from class java.util.EventObject
getSource, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.globalmentor.event.Event
getSource
Methods inherited from interface io.guise.framework.event.GestureInputEvent
getInput, getKeys, hasAltKey, hasControlKey, hasShiftKey
Methods inherited from interface io.guise.framework.event.GuiseEvent
getSession
Methods inherited from interface io.guise.framework.event.InputEvent
consume, isConsumed
-
Constructor Details
-
AbstractMouseEvent
public AbstractMouseEvent(Object source, Object target, Rectangle targetBounds, Rectangle viewportBounds, Point mousePosition, Key... keys) Source and target constructor.- Parameters:
source
- The object on which the event initially occurred.target
- The target of the event.targetBounds
- The absolute bounds of the event target.viewportBounds
- The absolute bounds of the viewport.mousePosition
- The position of the mouse relative to the viewport.keys
- The keys that were pressed when this event was generated.- Throws:
NullPointerException
- if the given source, target, target bounds, viewport bounds, mouse position, and/or keys isnull
.
-
-
Method Details
-
getTarget
- Specified by:
getTarget
in interfacecom.globalmentor.event.TargetedEvent
-
getTargetBounds
- Specified by:
getTargetBounds
in interfaceMouseEvent
- Returns:
- The absolute bounds of the event target.
-
getViewportBounds
- Specified by:
getViewportBounds
in interfaceMouseEvent
- Returns:
- The absolute bounds of the viewport.
-
getMousePosition
- Specified by:
getMousePosition
in interfaceMouseEvent
- Returns:
- The position of the mouse relative to the viewport.
-