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 voidapply()Implementations are expected to apply any changes to theViewstate prior to the View setting the modelview matrix for rendering the current frame.protected booleancallActionListener(KeyEventState keys, java.lang.String target, ViewInputAttributes.ActionAttributes action)protected booleancallActionListListeners(KeyEventState keys, java.lang.String target, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)protected booleancallActionListListeners(java.awt.event.KeyEvent e, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)protected booleancallMouseActionListListeners(java.awt.event.MouseEvent e, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)protected booleancallMouseWheelActionListListeners(java.awt.event.MouseWheelEvent e, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)protected voidhandleKeyPressed(java.awt.event.KeyEvent e)protected voidhandleMouseClicked(java.awt.event.MouseEvent e)protected voidhandleMouseDragged(java.awt.event.MouseEvent e)protected voidhandleMouseWheelMoved(java.awt.event.MouseWheelEvent e)protected booleanhandlePerFrameKeyState(KeyEventState keys, java.lang.String target)protected booleanhandlePerFrameMouseState(KeyEventState keys, java.lang.String target)protected voidhandlePropertyChange(java.beans.PropertyChangeEvent e)protected voidhandleViewStopped()protected abstract voidonHorizontalTranslateRel(double forwardInput, double sideInput, double sideInputFromMouseDown, double forwardInputFromMouseDown, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)protected abstract voidonMoveTo(Position focalPosition, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttribs)protected abstract voidonResetHeading(ViewInputAttributes.ActionAttributes actionAttribs)protected abstract voidonResetHeadingPitchRoll(ViewInputAttributes.ActionAttributes actionAttribs)protected abstract voidonRotateView(double headingInput, double pitchInput, double totalHeadingInput, double totalPitchInput, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)protected abstract voidonVerticalTranslate(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:ViewInputHandlerImplementations are expected to apply any changes to theViewstate prior to the View setting the modelview matrix for rendering the current frame.- Specified by:
applyin interfaceViewInputHandler- Overrides:
applyin classAbstractViewInputHandler
-
handleKeyPressed
protected void handleKeyPressed(java.awt.event.KeyEvent e)
- Overrides:
handleKeyPressedin classAbstractViewInputHandler
-
handleMouseClicked
protected void handleMouseClicked(java.awt.event.MouseEvent e)
- Overrides:
handleMouseClickedin classAbstractViewInputHandler
-
handleMouseWheelMoved
protected void handleMouseWheelMoved(java.awt.event.MouseWheelEvent e)
- Overrides:
handleMouseWheelMovedin classAbstractViewInputHandler
-
handleMouseDragged
protected void handleMouseDragged(java.awt.event.MouseEvent e)
- Overrides:
handleMouseDraggedin classAbstractViewInputHandler
-
handlePerFrameKeyState
protected boolean handlePerFrameKeyState(KeyEventState keys, java.lang.String target)
- Overrides:
handlePerFrameKeyStatein classAbstractViewInputHandler
-
handlePerFrameMouseState
protected boolean handlePerFrameMouseState(KeyEventState keys, java.lang.String target)
- Overrides:
handlePerFrameMouseStatein 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:
handlePropertyChangein classAbstractViewInputHandler
-
handleViewStopped
protected void handleViewStopped()
-
-