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
,java.io.Serializable
- Direct Known Subclasses:
MouseClickEvent
,MouseEnterEvent
,MouseExitEvent
public abstract class AbstractMouseEvent extends AbstractGestureInputEvent implements MouseEvent
An abstract event providing mouse input information.- Author:
- Garret Wilson
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractMouseEvent(java.lang.Object source, java.lang.Object target, Rectangle targetBounds, Rectangle viewportBounds, Point mousePosition, Key... keys)
Source and target constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Point
getMousePosition()
java.lang.Object
getTarget()
Rectangle
getTargetBounds()
Rectangle
getViewportBounds()
-
Methods 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.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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 Detail
-
AbstractMouseEvent
public AbstractMouseEvent(java.lang.Object source, java.lang.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:
java.lang.NullPointerException
- if the given source, target, target bounds, viewport bounds, mouse position, and/or keys isnull
.
-
-
Method Detail
-
getTarget
public java.lang.Object getTarget()
- Specified by:
getTarget
in interfacecom.globalmentor.event.TargetedEvent
-
getTargetBounds
public Rectangle getTargetBounds()
- Specified by:
getTargetBounds
in interfaceMouseEvent
- Returns:
- The absolute bounds of the event target.
-
getViewportBounds
public Rectangle getViewportBounds()
- Specified by:
getViewportBounds
in interfaceMouseEvent
- Returns:
- The absolute bounds of the viewport.
-
getMousePosition
public Point getMousePosition()
- Specified by:
getMousePosition
in interfaceMouseEvent
- Returns:
- The position of the mouse relative to the viewport.
-
-