com.guiseframework.event
Class AbstractMouseEvent
java.lang.Object
java.util.EventObject
com.globalmentor.event.AbstractEvent
com.guiseframework.event.AbstractGuiseEvent
com.guiseframework.event.AbstractInputEvent
com.guiseframework.event.AbstractGestureInputEvent
com.guiseframework.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
| Fields inherited from class java.util.EventObject |
source |
| 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 |
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 is null.
getTarget
public java.lang.Object getTarget()
- Returns the object to which the event applies.
This may be a different than source, which is the object that generated this event instance.
- Specified by:
getTarget in interface com.globalmentor.event.TargetedEvent
- Returns:
- The target of the event.
getTargetBounds
public Rectangle getTargetBounds()
- Specified by:
getTargetBounds in interface MouseEvent
- Returns:
- The absolute bounds of the event target.
getViewportBounds
public Rectangle getViewportBounds()
- Specified by:
getViewportBounds in interface MouseEvent
- Returns:
- The absolute bounds of the viewport.
getMousePosition
public Point getMousePosition()
- Specified by:
getMousePosition in interface MouseEvent
- Returns:
- The position of the mouse relative to the viewport.
Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.