Class TLspRotateController
java.lang.Object
com.luciad.view.lightspeed.controller.ALspController
com.luciad.view.lightspeed.controller.navigation.TLspRotateController
- All Implemented Interfaces:
ILcdAWTEventListener,ILspController
Allows the user to rotate a view by clicking and dragging it. In a 2D view, the map is rotated
around the vertical axis.
In 3D, the controller navigates around and toward the object that is under the mouse. This allows convenient navigation around tall or air-borne objects. For instance, air tracks or airspaces.
Also, the pitch and yaw angles of the observer are affected.
- Since:
- 2012.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TLspRotateController with a default name, short description, icon and rotate spot icon. -
Method Summary
Modifier and TypeMethodDescriptionReturns the cursor to be used while rotating (while the triggering mouse button is pressed).Used to retrieve the icon that is used to denote the anchor spot when rotating the view.handleAWTEventImpl(AWTEvent aAWTEvent) Called byhandleAWTEvent.handleFXEventImpl(Event aEvent) Called byhandleFXEvent.booleanReturns whether this rotate controller will rotate around the center of the view or not.voidsetCursorWhileRotating(Cursor aCursor) Sets the cursor to be used while rotating (while the triggering mouse button is pressed).voidsetRotateAroundCenter(boolean aRotateAroundCenter) Sets whether this rotate controller will rotate around the center of the view or not.voidsetRotateSpotIcon(ILcdAnchoredIcon aRotateSpotIcon) Used to set the provided icon as the icon that will be used to denote the anchor spot when rotating the view.voidstartInteraction(ILspView aView) Called to start interacting with the controller.voidterminateInteraction(ILspView aView) Terminates interaction with this controller.Methods inherited from class com.luciad.view.lightspeed.controller.ALspController
addPropertyChangeListener, addStatusListener, appendController, firePropertyChange, fireStatusEvent, getAWTFilter, getCursor, getFXCursor, getFXFilter, getIcon, getLayered, getName, getNextController, getShortDescription, getView, handleAWTEvent, handleFXEvent, paint, paintImpl, registerViewPropertyNameForReset, removePropertyChangeListener, removeStatusListener, setAWTFilter, setCursor, setFXCursor, setFXFilter, setIcon, setName, setShortDescription, startInteractionImpl, terminateInteractionImpl
-
Constructor Details
-
TLspRotateController
public TLspRotateController()Creates a new TLspRotateController with a default name, short description, icon and rotate spot icon.
-
-
Method Details
-
isRotateAroundCenter
public boolean isRotateAroundCenter()Returns whether this rotate controller will rotate around the center of the view or not.- Returns:
trueif this rotate controller rotates around the center of the viewfalseotherwise.
-
setRotateAroundCenter
public void setRotateAroundCenter(boolean aRotateAroundCenter) Sets whether this rotate controller will rotate around the center of the view or not.- Parameters:
aRotateAroundCenter-trueif this rotate controller rotates around the center of the viewfalseotherwise.
-
startInteraction
Description copied from class:ALspControllerCalled to start interacting with the controller. This automatically happens when setting the controller on the view usingILspView.setController(com.luciad.view.lightspeed.controller.ILspController). This implementation sends out a status event based on theshort description. It also callsstartInteractionon the next controller. OverridestartInteractionImplif you want to add your own behavior to this controller.- Specified by:
startInteractionin interfaceILspController- Overrides:
startInteractionin classALspController- Parameters:
aView- the view the controller operates on
-
terminateInteraction
Description copied from class:ALspControllerTerminates interaction with this controller. This automatically happens when setting a different controller on the view usingILspView.setController(com.luciad.view.lightspeed.controller.ILspController). This implementation also callsterminateInteractionon the next controller. OverrideterminateInteractionImplif you want to add your own behavior to this controller.- Specified by:
terminateInteractionin interfaceILspController- Overrides:
terminateInteractionin classALspController- Parameters:
aView- the view the controller was operating on
-
handleAWTEventImpl
Description copied from class:ALspControllerCalled byhandleAWTEvent. Returnsnullwhen the controller consumed the event or a partially consumed event when the controller partially consumed the event (which could happen withTLcdTouchEvents). When the controller did not use the given event, it is returned unaltered.- Specified by:
handleAWTEventImplin classALspController- Parameters:
aAWTEvent- the event to be handled.- Returns:
nullwhen the input event was consumed, the (possibly modified) input event when it was (partially) consumed.
-
handleFXEventImpl
Description copied from class:ALspControllerCalled byhandleFXEvent. Returnsnullwhen the controller consumed the event. When the controller did not use the given event, it is returned unaltered.- Overrides:
handleFXEventImplin classALspController- Parameters:
aEvent- the event to be handled.- Returns:
nullwhen the input event was consumed, the (possibly modified) input event when it was (partially) consumed.
-
setRotateSpotIcon
Used to set the provided icon as the icon that will be used to denote the anchor spot when rotating the view.- Parameters:
aRotateSpotIcon- the icon that will be used to denote the anchor spot when rotating the view
-
getRotateSpotIcon
Used to retrieve the icon that is used to denote the anchor spot when rotating the view.- Returns:
- The icon that is used to denote the anchor spot when rotating the view.
-
getCursorWhileRotating
Returns the cursor to be used while rotating (while the triggering mouse button is pressed).- Returns:
- the rotate cursor
-
setCursorWhileRotating
Sets the cursor to be used while rotating (while the triggering mouse button is pressed).- Parameters:
aCursor- the new cursor to use.- See Also:
-