Package gov.nasa.worldwind.awt
Class BasicViewInputHandler
- java.lang.Object
-
- gov.nasa.worldwind.awt.AbstractViewInputHandler
-
- gov.nasa.worldwind.awt.BasicViewInputHandler
-
- All Implemented Interfaces:
ViewInputHandler
,java.awt.event.FocusListener
,java.awt.event.KeyListener
,java.awt.event.MouseListener
,java.awt.event.MouseMotionListener
,java.awt.event.MouseWheelListener
,java.beans.PropertyChangeListener
,java.util.EventListener
- Direct Known Subclasses:
FlyViewInputHandler
,OrbitViewInputHandler
public abstract class BasicViewInputHandler extends AbstractViewInputHandler
-
-
Nested Class Summary
-
Field Summary
-
Fields inherited from class gov.nasa.worldwind.awt.AbstractViewInputHandler
attributes, DEFAULT_DRAG_SLOPE_FACTOR, DEFAULT_PER_FRAME_INPUT_INTERVAL, dragSlopeFactor, enableSmoothing, GENERATE_EVENTS, keyActionMap, keyEventState, keyModsActionMap, lastMousePoint, lastPerFrameInputTime, lockHeading, modifierList, mouseActionMap, mouseDownModelview, mouseDownPoint, mouseDownProjection, mouseDownViewport, mouseModsActionMap, mousePoint, mouseWheelModsActionMap, NUM_MODIFIERS, perFrameInputInterval, QUERY_EVENTS, SCALE_FUNC_EYE_ALTITUDE, SCALE_FUNC_EYE_ALTITUDE_EXP, SCALE_FUNC_ZOOM, SCALE_FUNC_ZOOM_EXP, selectedPosition, stopOnFocusLost, wwd, wwdFocusOwner
-
-
Constructor Summary
Constructors Constructor Description BasicViewInputHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
apply()
Implementations are expected to apply any changes to theView
state prior to the View setting the modelview matrix for rendering the current frame.protected boolean
callActionListener(KeyEventState keys, java.lang.String target, ViewInputAttributes.ActionAttributes action)
protected boolean
callActionListListeners(KeyEventState keys, java.lang.String target, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)
protected boolean
callActionListListeners(java.awt.event.KeyEvent e, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)
protected boolean
callMouseActionListListeners(java.awt.event.MouseEvent e, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)
protected boolean
callMouseWheelActionListListeners(java.awt.event.MouseWheelEvent e, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)
protected void
handleKeyPressed(java.awt.event.KeyEvent e)
protected void
handleMouseClicked(java.awt.event.MouseEvent e)
protected void
handleMouseDragged(java.awt.event.MouseEvent e)
protected void
handleMouseWheelMoved(java.awt.event.MouseWheelEvent e)
protected boolean
handlePerFrameKeyState(KeyEventState keys, java.lang.String target)
protected boolean
handlePerFrameMouseState(KeyEventState keys, java.lang.String target)
protected void
handlePropertyChange(java.beans.PropertyChangeEvent e)
protected void
handleViewStopped()
protected abstract void
onHorizontalTranslateRel(double forwardInput, double sideInput, double sideInputFromMouseDown, double forwardInputFromMouseDown, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)
protected abstract void
onMoveTo(Position focalPosition, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttribs)
protected abstract void
onResetHeading(ViewInputAttributes.ActionAttributes actionAttribs)
protected abstract void
onResetHeadingPitchRoll(ViewInputAttributes.ActionAttributes actionAttribs)
protected abstract void
onRotateView(double headingInput, double pitchInput, double totalHeadingInput, double totalPitchInput, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)
protected abstract void
onVerticalTranslate(double translateChange, double totalTranslateChange, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)
-
Methods inherited from class gov.nasa.worldwind.awt.AbstractViewInputHandler
computeDragSlope, computeSelectedPointAt, computeSelectedPosition, constrainToSourceBounds, evaluateScaleFuncEyeAltitude, evaluateScaleFuncZoom, focusGained, focusLost, getAttributes, getChangeInLocation, getDragSlopeFactor, getLastMousePoint, getMouseDownPoint, getMousePoint, getPerFrameInputInterval, getScaledValue, getScaleValue, getScaleValueElevation, getSelectedPosition, getView, getWorldWindow, handleFocusGained, handleFocusLost, handleKeyReleased, handleMouseMoved, handleMousePressed, handleMouseReleased, handlePerFrameAnimation, isEnableSmoothing, isLockHeading, isStopOnFocusLost, isWorldWindowFocusOwner, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, onStopView, propertyChange, rawInputToChangeInValue, setAttributes, setDragSlopeFactor, setEnableSmoothing, setLockHeading, setMouseDownPoint, setMouseDownView, setPerFrameInputInterval, setSelectedPosition, setStopOnFocusLost, setWorldWindow, setWorldWindowFocusOwner, updateMousePoint, viewApplied
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nasa.worldwind.awt.ViewInputHandler
addAnimator, goTo, isAnimating, stopAnimators
-
-
-
-
Method Detail
-
onMoveTo
protected abstract void onMoveTo(Position focalPosition, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttribs)
-
onHorizontalTranslateRel
protected abstract void onHorizontalTranslateRel(double forwardInput, double sideInput, double sideInputFromMouseDown, double forwardInputFromMouseDown, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)
-
onVerticalTranslate
protected abstract void onVerticalTranslate(double translateChange, double totalTranslateChange, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)
-
onRotateView
protected abstract void onRotateView(double headingInput, double pitchInput, double totalHeadingInput, double totalPitchInput, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)
-
onResetHeading
protected abstract void onResetHeading(ViewInputAttributes.ActionAttributes actionAttribs)
-
onResetHeadingPitchRoll
protected abstract void onResetHeadingPitchRoll(ViewInputAttributes.ActionAttributes actionAttribs)
-
apply
public void apply()
Description copied from interface:ViewInputHandler
Implementations are expected to apply any changes to theView
state prior to the View setting the modelview matrix for rendering the current frame.- Specified by:
apply
in interfaceViewInputHandler
- Overrides:
apply
in classAbstractViewInputHandler
-
handleKeyPressed
protected void handleKeyPressed(java.awt.event.KeyEvent e)
- Overrides:
handleKeyPressed
in classAbstractViewInputHandler
-
handleMouseClicked
protected void handleMouseClicked(java.awt.event.MouseEvent e)
- Overrides:
handleMouseClicked
in classAbstractViewInputHandler
-
handleMouseWheelMoved
protected void handleMouseWheelMoved(java.awt.event.MouseWheelEvent e)
- Overrides:
handleMouseWheelMoved
in classAbstractViewInputHandler
-
handleMouseDragged
protected void handleMouseDragged(java.awt.event.MouseEvent e)
- Overrides:
handleMouseDragged
in classAbstractViewInputHandler
-
handlePerFrameKeyState
protected boolean handlePerFrameKeyState(KeyEventState keys, java.lang.String target)
- Overrides:
handlePerFrameKeyState
in classAbstractViewInputHandler
-
handlePerFrameMouseState
protected boolean handlePerFrameMouseState(KeyEventState keys, java.lang.String target)
- Overrides:
handlePerFrameMouseState
in classAbstractViewInputHandler
-
callMouseActionListListeners
protected boolean callMouseActionListListeners(java.awt.event.MouseEvent e, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)
-
callMouseWheelActionListListeners
protected boolean callMouseWheelActionListListeners(java.awt.event.MouseWheelEvent e, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)
-
callActionListListeners
protected boolean callActionListListeners(java.awt.event.KeyEvent e, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)
-
callActionListListeners
protected boolean callActionListListeners(KeyEventState keys, java.lang.String target, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)
-
callActionListener
protected boolean callActionListener(KeyEventState keys, java.lang.String target, ViewInputAttributes.ActionAttributes action)
-
handlePropertyChange
protected void handlePropertyChange(java.beans.PropertyChangeEvent e)
- Overrides:
handlePropertyChange
in classAbstractViewInputHandler
-
handleViewStopped
protected void handleViewStopped()
-
-