|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectEventObject
AWTEvent
ComponentEvent
InputEvent
MouseEvent
MapMouseEvent
public final class MapMouseEvent
A MouseEvent
with methods to retrieve position in world coordinates.
Field Summary |
---|
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 ComponentEvent |
---|
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN |
Fields inherited from class EventObject |
---|
source |
Constructor Summary | |
---|---|
MapMouseEvent(MapPane pane,
MouseEvent event)
Creates a new event instance. |
|
MapMouseEvent(MapPane pane,
MouseWheelEvent event)
Creates a new event instance for a mouse wheel event. |
Method Summary | |
---|---|
ReferencedEnvelope |
getEnvelopeByPixels(double widthPixels)
Gets an envelope of specified width (in pixels) which is centred on the mouse position. |
ReferencedEnvelope |
getEnvelopeByWorld(double widthWorld)
Gets an envelope of specified width (in world distance units) which is centred on the mouse position. |
DirectPosition2D |
getMapPosition()
Deprecated. Please use getWorldPos() instead |
MapPane |
getSource()
Gets the source map pane for this event. |
int |
getWheelAmount()
Gets the wheel travel amount for a mouse wheel event. |
DirectPosition2D |
getWorldPos()
Gets the mouse position in world coordinates. |
boolean |
isWheelEvent()
Queries whether this event was generated by a mouse wheel action. |
Methods inherited from class MouseEvent |
---|
getButton, getClickCount, getLocationOnScreen, getMouseModifiersText, getPoint, getX, getXOnScreen, getY, getYOnScreen, isPopupTrigger, paramString, translatePoint |
Methods inherited from class InputEvent |
---|
consume, getModifiers, getModifiersEx, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown |
Methods inherited from class ComponentEvent |
---|
getComponent |
Methods inherited from class AWTEvent |
---|
getID, setSource, toString |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MapMouseEvent(MapPane pane, MouseEvent event)
pane
- the source map paneevent
- the source mouse eventpublic MapMouseEvent(MapPane pane, MouseWheelEvent event)
pane
- the source map paneevent
- the source mouse wheel eventMethod Detail |
---|
public MapPane getSource()
getSource
in class EventObject
public boolean isWheelEvent()
public int getWheelAmount()
public DirectPosition2D getMapPosition()
getWorldPos()
instead
public DirectPosition2D getWorldPos()
public ReferencedEnvelope getEnvelopeByWorld(double widthWorld)
widthWorld
- envelope width in world units
IllegalArgumentException
- if widthWorld
is less than zeropublic ReferencedEnvelope getEnvelopeByPixels(double widthPixels)
widthPixels
- envelope width in pixels
IllegalArgumentException
- if widthPixels
is less than zero
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |