NASA World Wind

gov.nasa.worldwind.awt
Class BasicViewInputHandler

java.lang.Object
  extended by gov.nasa.worldwind.awt.AbstractViewInputHandler
      extended by gov.nasa.worldwind.awt.BasicViewInputHandler
All Implemented Interfaces:
ViewInputHandler, FocusListener, KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, PropertyChangeListener, EventListener
Direct Known Subclasses:
FlyViewInputHandler, OrbitViewInputHandler

public abstract class BasicViewInputHandler
extends AbstractViewInputHandler


Nested Class Summary
 class BasicViewInputHandler.HorizontalTransActionListener
           
 class BasicViewInputHandler.HorizTransMouseActionListener
           
 class BasicViewInputHandler.MoveToMouseActionListener
           
 class BasicViewInputHandler.ResetHeadingActionListener
           
 class BasicViewInputHandler.ResetHeadingPitchActionListener
           
 class BasicViewInputHandler.RotateActionListener
           
 class BasicViewInputHandler.RotateMouseActionListener
           
 class BasicViewInputHandler.StopViewActionListener
           
 class BasicViewInputHandler.VerticalTransActionListener
           
 class BasicViewInputHandler.VertTransMouseActionListener
           
 class BasicViewInputHandler.VertTransMouseWheelActionListener
           
 
Field Summary
 
Fields inherited from class gov.nasa.worldwind.awt.AbstractViewInputHandler
attributes, DEFAULT_DRAG_SLOPE_FACTOR, DEFAULT_PER_FRAME_INPUT_DELAY, dragSlopeFactor, enableSmoothing, GENERATE_EVENTS, keyActionMap, keyEventState, keyModsActionMap, lastMousePoint, lastPerFrameInputTime, lockHeading, modifierList, mouseActionMap, mouseDownPoint, mouseModsActionMap, mousePoint, mouseWheelModsActionMap, NUM_MODIFIERS, QUERY_EVENTS, SCALE_FUNC_EYE_ALTITUDE, SCALE_FUNC_EYE_ALTITUDE_EXP, SCALE_FUNC_ZOOM, SCALE_FUNC_ZOOM_EXP, selectedPosition, stopOnFocusLost, wwd, wwdFocusOwner
 
Constructor Summary
BasicViewInputHandler()
           
 
Method Summary
 void apply()
          Implementations are expected to apply any changes to the View state prior to the View setting the modelview matrix for rendering the current frame.
protected  boolean callActionListListeners(KeyEventState keys, String target, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)
           
protected  boolean callActionListListeners(KeyEvent e, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)
           
protected  boolean callMouseActionListListeners(MouseEvent e, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)
           
protected  boolean callMouseWheelActionListListeners(MouseWheelEvent e, ViewInputAttributes.ActionAttributes.ActionTrigger trigger, ViewInputAttributes.ActionAttributesList actionList)
           
 void goTo(Position lookAtPos, double elevation)
          Animate to the specified position.
protected  void handleKeyPressed(KeyEvent e)
           
protected  void handleMouseClicked(MouseEvent e)
           
protected  void handleMouseDragged(MouseEvent e)
           
protected  void handleMouseWheelMoved(MouseWheelEvent e)
           
protected  boolean handlePerFrameKeyState(KeyEventState keys, String target)
           
protected  boolean handlePerFrameMouseState(KeyEventState keys, String target)
           
protected  void handlePropertyChange(PropertyChangeEvent e)
           
protected  void handleViewStopped()
           
protected  void onHorizontalTranslateAbs(Angle latitudeChange, Angle longitudeChange, ViewInputAttributes.ActionAttributes actionAttribs)
           
protected  void onHorizontalTranslateRel(double forwardInput, double sideInput, double totalForwardInput, double totalSideInput, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)
           
protected  void onHorizontalTranslateRel(double forwardChange, double sideChange, ViewInputAttributes.ActionAttributes actionAttribs)
           
protected  void onMoveTo(Position focalPosition, ViewInputAttributes.ActionAttributes actionAttribs)
           
protected  void onMoveTo(Position focalPosition, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttribs)
           
protected  void onResetHeading(ViewInputAttributes.ActionAttributes actionAttribs)
           
protected  void onResetHeadingPitchRoll(ViewInputAttributes.ActionAttributes actionAttribs)
           
protected  void onRotateView(Angle headingChange, Angle pitchChange, double totalHeadingInput, double totalPitchInput, ViewInputAttributes.ActionAttributes actionAttribs)
           
protected  void onRotateView(double headingChange, double pitchChange, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)
           
protected  void onVerticalTranslate(double translateChange, ViewInputAttributes.ActionAttributes actionAttribs)
           
protected  void onVerticalTranslate(double translateChange, ViewInputAttributes.DeviceAttributes deviceAttributes, ViewInputAttributes.ActionAttributes actionAttributes)
           
 
Methods inherited from class gov.nasa.worldwind.awt.AbstractViewInputHandler
callActionListener, computeDragSlope, computeSelectedPointAt, computeSelectedPosition, constrainToSourceBounds, evaluateScaleFuncEyeAltitude, evaluateScaleFuncZoom, focusGained, focusLost, getAttributes, getChangeInLocation, getDragSlopeFactor, getLastMousePoint, getMouseDownPoint, getMousePoint, getScaledValue, getScaleValue, getScaleValueElevation, getSelectedPosition, getView, getWorldWindow, handleFocusGained, handleFocusLost, handleKeyReleased, handleMouseMoved, handleMousePressed, handleMouseReleased, isEnableSmoothing, isLockHeading, isStopOnFocusLost, isWorldWindowFocusOwner, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, onHorizontalTranslateRel, onRotateView, onRotateView, onStopView, onVerticalTranslate, propertyChange, rawInputToChangeInValue, setAttributes, setDragSlopeFactor, setEnableSmoothing, setLockHeading, setMouseDownPoint, setSelectedPosition, setStopOnFocusLost, setWorldWindow, setWorldWindowFocusOwner, updateMousePoint, viewApplied
 
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.awt.ViewInputHandler
addAnimator, isAnimating, stopAnimators
 

Constructor Detail

BasicViewInputHandler

public BasicViewInputHandler()
Method Detail

apply

public void apply()
Description copied from interface: ViewInputHandler
Implementations are expected to apply any changes to the View state prior to the View setting the modelview matrix for rendering the current frame.

Specified by:
apply in interface ViewInputHandler
Overrides:
apply in class AbstractViewInputHandler

callActionListListeners

protected boolean callActionListListeners(KeyEventState keys,
                                          String target,
                                          ViewInputAttributes.ActionAttributes.ActionTrigger trigger,
                                          ViewInputAttributes.ActionAttributesList actionList)

callActionListListeners

protected boolean callActionListListeners(KeyEvent e,
                                          ViewInputAttributes.ActionAttributes.ActionTrigger trigger,
                                          ViewInputAttributes.ActionAttributesList actionList)

callMouseActionListListeners

protected boolean callMouseActionListListeners(MouseEvent e,
                                               ViewInputAttributes.ActionAttributes.ActionTrigger trigger,
                                               ViewInputAttributes.ActionAttributesList actionList)

callMouseWheelActionListListeners

protected boolean callMouseWheelActionListListeners(MouseWheelEvent e,
                                                    ViewInputAttributes.ActionAttributes.ActionTrigger trigger,
                                                    ViewInputAttributes.ActionAttributesList actionList)

goTo

public void goTo(Position lookAtPos,
                 double elevation)
Description copied from interface: ViewInputHandler
Animate to the specified position. The implementation is expected to animate the View to look at the given position from the given elevation.

Parameters:
lookAtPos - The position to animate the view to look at.
elevation - The elevation to look at the position from.

handleKeyPressed

protected void handleKeyPressed(KeyEvent e)
Overrides:
handleKeyPressed in class AbstractViewInputHandler

handleMouseClicked

protected void handleMouseClicked(MouseEvent e)
Overrides:
handleMouseClicked in class AbstractViewInputHandler

handleMouseDragged

protected void handleMouseDragged(MouseEvent e)
Overrides:
handleMouseDragged in class AbstractViewInputHandler

handleMouseWheelMoved

protected void handleMouseWheelMoved(MouseWheelEvent e)
Overrides:
handleMouseWheelMoved in class AbstractViewInputHandler

handlePerFrameKeyState

protected boolean handlePerFrameKeyState(KeyEventState keys,
                                         String target)
Overrides:
handlePerFrameKeyState in class AbstractViewInputHandler

handlePerFrameMouseState

protected boolean handlePerFrameMouseState(KeyEventState keys,
                                           String target)
Overrides:
handlePerFrameMouseState in class AbstractViewInputHandler

handlePropertyChange

protected void handlePropertyChange(PropertyChangeEvent e)
Overrides:
handlePropertyChange in class AbstractViewInputHandler

handleViewStopped

protected void handleViewStopped()

onHorizontalTranslateAbs

protected void onHorizontalTranslateAbs(Angle latitudeChange,
                                        Angle longitudeChange,
                                        ViewInputAttributes.ActionAttributes actionAttribs)
Specified by:
onHorizontalTranslateAbs in class AbstractViewInputHandler

onHorizontalTranslateRel

protected void onHorizontalTranslateRel(double forwardInput,
                                        double sideInput,
                                        double totalForwardInput,
                                        double totalSideInput,
                                        ViewInputAttributes.DeviceAttributes deviceAttributes,
                                        ViewInputAttributes.ActionAttributes actionAttributes)
Specified by:
onHorizontalTranslateRel in class AbstractViewInputHandler

onHorizontalTranslateRel

protected void onHorizontalTranslateRel(double forwardChange,
                                        double sideChange,
                                        ViewInputAttributes.ActionAttributes actionAttribs)

onMoveTo

protected void onMoveTo(Position focalPosition,
                        ViewInputAttributes.ActionAttributes actionAttribs)
Specified by:
onMoveTo in class AbstractViewInputHandler

onMoveTo

protected void onMoveTo(Position focalPosition,
                        ViewInputAttributes.DeviceAttributes deviceAttributes,
                        ViewInputAttributes.ActionAttributes actionAttribs)
Specified by:
onMoveTo in class AbstractViewInputHandler

onResetHeading

protected void onResetHeading(ViewInputAttributes.ActionAttributes actionAttribs)
Specified by:
onResetHeading in class AbstractViewInputHandler

onResetHeadingPitchRoll

protected void onResetHeadingPitchRoll(ViewInputAttributes.ActionAttributes actionAttribs)
Specified by:
onResetHeadingPitchRoll in class AbstractViewInputHandler

onRotateView

protected void onRotateView(Angle headingChange,
                            Angle pitchChange,
                            double totalHeadingInput,
                            double totalPitchInput,
                            ViewInputAttributes.ActionAttributes actionAttribs)

onRotateView

protected void onRotateView(double headingChange,
                            double pitchChange,
                            ViewInputAttributes.DeviceAttributes deviceAttributes,
                            ViewInputAttributes.ActionAttributes actionAttributes)

onVerticalTranslate

protected void onVerticalTranslate(double translateChange,
                                   ViewInputAttributes.ActionAttributes actionAttribs)
Specified by:
onVerticalTranslate in class AbstractViewInputHandler

onVerticalTranslate

protected void onVerticalTranslate(double translateChange,
                                   ViewInputAttributes.DeviceAttributes deviceAttributes,
                                   ViewInputAttributes.ActionAttributes actionAttributes)

NASA World Wind