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
ConstructorDescriptionCreates 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
.boolean
Returns whether this rotate controller will rotate around the center of the view or not.void
setCursorWhileRotating
(Cursor aCursor) Sets the cursor to be used while rotating (while the triggering mouse button is pressed).void
setRotateAroundCenter
(boolean aRotateAroundCenter) Sets whether this rotate controller will rotate around the center of the view or not.void
setRotateSpotIcon
(ILcdAnchoredIcon aRotateSpotIcon) Used to set the provided icon as the icon that will be used to denote the anchor spot when rotating the view.void
startInteraction
(ILspView aView) Called to start interacting with the controller.void
terminateInteraction
(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:
true
if this rotate controller rotates around the center of the viewfalse
otherwise.
-
setRotateAroundCenter
public void setRotateAroundCenter(boolean aRotateAroundCenter) Sets whether this rotate controller will rotate around the center of the view or not.- Parameters:
aRotateAroundCenter
-true
if this rotate controller rotates around the center of the viewfalse
otherwise.
-
startInteraction
Description copied from class:ALspController
Called 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 callsstartInteraction
on the next controller. OverridestartInteractionImpl
if you want to add your own behavior to this controller.- Specified by:
startInteraction
in interfaceILspController
- Overrides:
startInteraction
in classALspController
- Parameters:
aView
- the view the controller operates on
-
terminateInteraction
Description copied from class:ALspController
Terminates 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 callsterminateInteraction
on the next controller. OverrideterminateInteractionImpl
if you want to add your own behavior to this controller.- Specified by:
terminateInteraction
in interfaceILspController
- Overrides:
terminateInteraction
in classALspController
- Parameters:
aView
- the view the controller was operating on
-
handleAWTEventImpl
Description copied from class:ALspController
Called byhandleAWTEvent
. Returnsnull
when the controller consumed the event or a partially consumed event when the controller partially consumed the event (which could happen withTLcdTouchEvent
s). When the controller did not use the given event, it is returned unaltered.- Specified by:
handleAWTEventImpl
in classALspController
- Parameters:
aAWTEvent
- the event to be handled.- Returns:
null
when the input event was consumed, the (possibly modified) input event when it was (partially) consumed.
-
handleFXEventImpl
Description copied from class:ALspController
Called byhandleFXEvent
. Returnsnull
when the controller consumed the event. When the controller did not use the given event, it is returned unaltered.- Overrides:
handleFXEventImpl
in classALspController
- Parameters:
aEvent
- the event to be handled.- Returns:
null
when 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:
-