gov.nasa.worldwind.awt
Class AWTInputHandler
java.lang.Object
gov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.awt.AWTInputHandler
- All Implemented Interfaces:
- AVList, Disposable, InputHandler, MessageListener, WWObject, FocusListener, KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, PropertyChangeListener, EventListener
public class AWTInputHandler
- extends WWObjectImpl
- implements KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, FocusListener, InputHandler, Disposable
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
eventListeners
protected EventListenerList eventListeners
forceRedrawOnMousePressed
protected boolean forceRedrawOnMousePressed
hoverObjects
protected PickedObjectList hoverObjects
hoverTimer
protected Timer hoverTimer
isDragging
protected boolean isDragging
isHovering
protected boolean isHovering
mousePoint
protected Point mousePoint
objectsAtButtonPress
protected PickedObjectList objectsAtButtonPress
selectListener
protected SelectListener selectListener
wwd
protected WorldWindow wwd
AWTInputHandler
public AWTInputHandler()
addKeyListener
public void addKeyListener(KeyListener listener)
- Specified by:
addKeyListener in interface InputHandler
addMouseListener
public void addMouseListener(MouseListener listener)
- Specified by:
addMouseListener in interface InputHandler
addMouseMotionListener
public void addMouseMotionListener(MouseMotionListener listener)
- Specified by:
addMouseMotionListener in interface InputHandler
addMouseWheelListener
public void addMouseWheelListener(MouseWheelListener listener)
- Specified by:
addMouseWheelListener in interface InputHandler
addSelectListener
public void addSelectListener(SelectListener listener)
- Specified by:
addSelectListener in interface InputHandler
callKeyPressedListeners
protected void callKeyPressedListeners(KeyEvent event)
callKeyReleasedListeners
protected void callKeyReleasedListeners(KeyEvent event)
callKeyTypedListeners
protected void callKeyTypedListeners(KeyEvent event)
callMouseClickedListeners
protected void callMouseClickedListeners(MouseEvent event)
callMouseDraggedListeners
protected void callMouseDraggedListeners(MouseEvent event)
callMouseEnteredListeners
protected void callMouseEnteredListeners(MouseEvent event)
callMouseExitedListeners
protected void callMouseExitedListeners(MouseEvent event)
callMouseMovedListeners
protected void callMouseMovedListeners(MouseEvent event)
callMousePressedListeners
protected void callMousePressedListeners(MouseEvent event)
callMouseReleasedListeners
protected void callMouseReleasedListeners(MouseEvent event)
callMouseWheelMovedListeners
protected void callMouseWheelMovedListeners(MouseWheelEvent event)
callSelectListeners
protected void callSelectListeners(SelectEvent event)
cancelDrag
protected void cancelDrag()
cancelHover
protected void cancelHover()
dispose
public void dispose()
- Description copied from interface:
Disposable
- Disposes of any internal resources allocated by the object.
- Specified by:
dispose in interface Disposable- Specified by:
dispose in interface InputHandler
doHover
protected void doHover(boolean reset)
focusGained
public void focusGained(FocusEvent focusEvent)
- Specified by:
focusGained in interface FocusListener
focusLost
public void focusLost(FocusEvent focusEvent)
- Specified by:
focusLost in interface FocusListener
getEventSource
public WorldWindow getEventSource()
- Specified by:
getEventSource in interface InputHandler
getHoverDelay
public int getHoverDelay()
- Specified by:
getHoverDelay in interface InputHandler
getHoverObjects
protected PickedObjectList getHoverObjects()
getMousePoint
protected Point getMousePoint()
getObjectsAtButtonPress
protected PickedObjectList getObjectsAtButtonPress()
getWorldWindow
protected WorldWindow getWorldWindow()
isForceRedrawOnMousePressed
public boolean isForceRedrawOnMousePressed()
- Description copied from interface:
InputHandler
- Indicates whether a redraw is forced when the a mouse button is pressed. Touch screen devices require this so
that the current position and selection are updated when the button is pressed. The update occurs naturally on
non-touch screen devices because the motion of the mouse prior to the press causes the current position and
selection to be updated.
- Specified by:
isForceRedrawOnMousePressed in interface InputHandler
- Returns:
- true if a redraw is forced when a button is pressed, otherwise false.
isHovering
protected boolean isHovering()
isLockViewHeading
public boolean isLockViewHeading()
isPickListEmpty
protected boolean isPickListEmpty(PickedObjectList pickList)
isSmoothViewChanges
public boolean isSmoothViewChanges()
isStopViewOnFocusLost
public boolean isStopViewOnFocusLost()
keyPressed
public void keyPressed(KeyEvent keyEvent)
- Specified by:
keyPressed in interface KeyListener
keyReleased
public void keyReleased(KeyEvent keyEvent)
- Specified by:
keyReleased in interface KeyListener
keyTyped
public void keyTyped(KeyEvent keyEvent)
- Specified by:
keyTyped in interface KeyListener
mouseClicked
public void mouseClicked(MouseEvent mouseEvent)
- Specified by:
mouseClicked in interface MouseListener
mouseDragged
public void mouseDragged(MouseEvent mouseEvent)
- Specified by:
mouseDragged in interface MouseMotionListener
mouseEntered
public void mouseEntered(MouseEvent mouseEvent)
- Specified by:
mouseEntered in interface MouseListener
mouseExited
public void mouseExited(MouseEvent mouseEvent)
- Specified by:
mouseExited in interface MouseListener
mouseMoved
public void mouseMoved(MouseEvent mouseEvent)
- Specified by:
mouseMoved in interface MouseMotionListener
mousePressed
public void mousePressed(MouseEvent mouseEvent)
- Specified by:
mousePressed in interface MouseListener
mouseReleased
public void mouseReleased(MouseEvent mouseEvent)
- Specified by:
mouseReleased in interface MouseListener
mouseWheelMoved
public void mouseWheelMoved(MouseWheelEvent mouseWheelEvent)
- Specified by:
mouseWheelMoved in interface MouseWheelListener
pickMatches
protected boolean pickMatches(PickedObjectList pickedObjects)
propertyChange
public void propertyChange(PropertyChangeEvent event)
- Description copied from class:
WWObjectImpl
- The property change listener for this instance.
Receives property change notifications that this instance has registered with other property change notifiers.
- Specified by:
propertyChange in interface PropertyChangeListener- Overrides:
propertyChange in class WWObjectImpl
- Parameters:
event - the event
removeHoverSelectListener
public void removeHoverSelectListener()
removeKeyListener
public void removeKeyListener(KeyListener listener)
- Specified by:
removeKeyListener in interface InputHandler
removeMouseListener
public void removeMouseListener(MouseListener listener)
- Specified by:
removeMouseListener in interface InputHandler
removeMouseMotionListener
public void removeMouseMotionListener(MouseMotionListener listener)
- Specified by:
removeMouseMotionListener in interface InputHandler
removeMouseWheelListener
public void removeMouseWheelListener(MouseWheelListener listener)
- Specified by:
removeMouseWheelListener in interface InputHandler
removeSelectListener
public void removeSelectListener(SelectListener listener)
- Specified by:
removeSelectListener in interface InputHandler
setEventSource
public void setEventSource(WorldWindow newWorldWindow)
- Specified by:
setEventSource in interface InputHandler
setForceRedrawOnMousePressed
public void setForceRedrawOnMousePressed(boolean forceRedrawOnMousePressed)
- Description copied from interface:
InputHandler
- Specifies whether a redraw is forced when the a mouse button is pressed. Touch screen devices require this so
that the current position and selection are updated when the button is pressed. The update occurs naturally on
non-touch screen devices because the motion of the mouse prior to the press causes the current position and
selection to be updated.
- Specified by:
setForceRedrawOnMousePressed in interface InputHandler
- Parameters:
forceRedrawOnMousePressed - true to force a redraw on button press, otherwise false, the default.
setHoverDelay
public void setHoverDelay(int delay)
- Specified by:
setHoverDelay in interface InputHandler
setHovering
protected void setHovering(boolean hovering)
setHoverObjects
protected void setHoverObjects(PickedObjectList hoverObjects)
setLockViewHeading
public void setLockViewHeading(boolean lockHeading)
setMousePoint
protected void setMousePoint(Point mousePoint)
setObjectsAtButtonPress
protected void setObjectsAtButtonPress(PickedObjectList objectsAtButtonPress)
setSmoothViewChanges
public void setSmoothViewChanges(boolean smoothViewChanges)
setStopViewOnFocusLost
public void setStopViewOnFocusLost(boolean stopView)