org.geotools.swing.event
Class MapMouseEvent
Object
EventObject
AWTEvent
ComponentEvent
InputEvent
MouseEvent
MapMouseEvent
- All Implemented Interfaces:
- Serializable
public final class MapMouseEvent
- extends MouseEvent
A MouseEvent which contains methods to obtain coordinates in real world CoordinateSystem as well
as Screen Coordinates.
- Since:
- 2.6
- Author:
- Michael Bedward (adapted from code by Cameron Shorter)
- See Also:
- Serialized Form
- Module:
Fields 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, NOBUTTON |
Fields 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_MASK |
Fields 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_MASK |
Methods inherited from class InputEvent |
consume, getModifiers, getModifiersEx, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown |
MapMouseEvent
public MapMouseEvent(JMapPane pane,
MouseEvent event)
- Constructor. Calculates the map position of the mouse event.
- Parameters:
pane
- the map pane sending this eventevent
- the mouse event
MapMouseEvent
public MapMouseEvent(JMapPane pane,
MouseWheelEvent event)
- Constructor for mouse wheel events.
- Parameters:
pane
- the map paneevent
- the mouse wheel event
isWheelEvent
public boolean isWheelEvent()
- Indicates a mouse wheel event.
- Returns:
true
if this a mouse wheel event
getWheelAmount
public int getWheelAmount()
- When isWheelEvent is true this indicate the amount of travel.
- Returns:
- Amount of travel when isWheelEvent is true
getMapPosition
public DirectPosition2D getMapPosition()
- Get the position, in map (world) coordinates of this mouse event
- Returns:
- a new DirectPosition2D object for the world coordinates
Copyright © 1996-2010 Geotools. All Rights Reserved.