public class AWTInputHandler extends WWObjectImpl implements KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, FocusListener, InputHandler, Disposable
| Modifier and Type | Field and Description |
|---|---|
protected EventListenerList |
eventListeners |
protected boolean |
forceRedrawOnMousePressed |
protected PickedObjectList |
hoverObjects |
protected Timer |
hoverTimer |
protected boolean |
isDragging |
protected boolean |
isHovering |
protected Point |
mousePoint |
protected PickedObjectList |
objectsAtButtonPress |
protected SelectListener |
selectListener |
protected WorldWindow |
wwd |
| Constructor and Description |
|---|
AWTInputHandler() |
onMessageaddPropertyChangeListener, 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, setValuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesprotected EventListenerList eventListeners
protected boolean forceRedrawOnMousePressed
protected PickedObjectList hoverObjects
protected Timer hoverTimer
protected boolean isDragging
protected boolean isHovering
protected Point mousePoint
protected PickedObjectList objectsAtButtonPress
protected SelectListener selectListener
protected WorldWindow wwd
public void addKeyListener(KeyListener listener)
addKeyListener in interface InputHandlerpublic void addMouseListener(MouseListener listener)
addMouseListener in interface InputHandlerpublic void addMouseMotionListener(MouseMotionListener listener)
addMouseMotionListener in interface InputHandlerpublic void addMouseWheelListener(MouseWheelListener listener)
addMouseWheelListener in interface InputHandlerpublic void addSelectListener(SelectListener listener)
addSelectListener in interface InputHandlerprotected void callKeyPressedListeners(KeyEvent event)
protected void callKeyReleasedListeners(KeyEvent event)
protected void callKeyTypedListeners(KeyEvent event)
protected void callMouseClickedListeners(MouseEvent event)
protected void callMouseDraggedListeners(MouseEvent event)
protected void callMouseEnteredListeners(MouseEvent event)
protected void callMouseExitedListeners(MouseEvent event)
protected void callMouseMovedListeners(MouseEvent event)
protected void callMousePressedListeners(MouseEvent event)
protected void callMouseReleasedListeners(MouseEvent event)
protected void callMouseWheelMovedListeners(MouseWheelEvent event)
protected void callSelectListeners(SelectEvent event)
protected void cancelDrag()
protected void cancelHover()
public void dispose()
Disposabledispose in interface Disposabledispose in interface InputHandlerprotected void doHover(boolean reset)
public void focusGained(FocusEvent focusEvent)
focusGained in interface FocusListenerpublic void focusLost(FocusEvent focusEvent)
focusLost in interface FocusListenerpublic WorldWindow getEventSource()
getEventSource in interface InputHandlerpublic int getHoverDelay()
getHoverDelay in interface InputHandlerprotected PickedObjectList getHoverObjects()
protected Point getMousePoint()
protected PickedObjectList getObjectsAtButtonPress()
protected WorldWindow getWorldWindow()
public boolean isForceRedrawOnMousePressed()
InputHandlerisForceRedrawOnMousePressed in interface InputHandlerprotected boolean isHovering()
public boolean isLockViewHeading()
protected boolean isPickListEmpty(PickedObjectList pickList)
public boolean isSmoothViewChanges()
public boolean isStopViewOnFocusLost()
public void keyPressed(KeyEvent keyEvent)
keyPressed in interface KeyListenerpublic void keyReleased(KeyEvent keyEvent)
keyReleased in interface KeyListenerpublic void keyTyped(KeyEvent keyEvent)
keyTyped in interface KeyListenerpublic void mouseClicked(MouseEvent mouseEvent)
mouseClicked in interface MouseListenerpublic void mouseDragged(MouseEvent mouseEvent)
mouseDragged in interface MouseMotionListenerpublic void mouseEntered(MouseEvent mouseEvent)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent mouseEvent)
mouseExited in interface MouseListenerpublic void mouseMoved(MouseEvent mouseEvent)
mouseMoved in interface MouseMotionListenerpublic void mousePressed(MouseEvent mouseEvent)
mousePressed in interface MouseListenerpublic void mouseReleased(MouseEvent mouseEvent)
mouseReleased in interface MouseListenerpublic void mouseWheelMoved(MouseWheelEvent mouseWheelEvent)
mouseWheelMoved in interface MouseWheelListenerprotected boolean pickMatches(PickedObjectList pickedObjects)
public void propertyChange(PropertyChangeEvent event)
WWObjectImplpropertyChange in interface PropertyChangeListenerpropertyChange in class WWObjectImplevent - the eventpublic void removeHoverSelectListener()
public void removeKeyListener(KeyListener listener)
removeKeyListener in interface InputHandlerpublic void removeMouseListener(MouseListener listener)
removeMouseListener in interface InputHandlerpublic void removeMouseMotionListener(MouseMotionListener listener)
removeMouseMotionListener in interface InputHandlerpublic void removeMouseWheelListener(MouseWheelListener listener)
removeMouseWheelListener in interface InputHandlerpublic void removeSelectListener(SelectListener listener)
removeSelectListener in interface InputHandlerpublic void setEventSource(WorldWindow newWorldWindow)
setEventSource in interface InputHandlerpublic void setForceRedrawOnMousePressed(boolean forceRedrawOnMousePressed)
InputHandlersetForceRedrawOnMousePressed in interface InputHandlerforceRedrawOnMousePressed - true to force a redraw on button press, otherwise false, the default.public void setHoverDelay(int delay)
setHoverDelay in interface InputHandlerprotected void setHovering(boolean hovering)
protected void setHoverObjects(PickedObjectList hoverObjects)
public void setLockViewHeading(boolean lockHeading)
protected void setMousePoint(Point mousePoint)
protected void setObjectsAtButtonPress(PickedObjectList objectsAtButtonPress)
public void setSmoothViewChanges(boolean smoothViewChanges)
public void setStopViewOnFocusLost(boolean stopView)