Class TLspPanController
java.lang.Object
com.luciad.view.lightspeed.controller.ALspController
com.luciad.view.lightspeed.controller.navigation.TLspPanController
- All Implemented Interfaces:
ILcdAWTEventListener
,ILspController
Allows the user to pan a view by clicking and dragging it.
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.
- Since:
- 2012.0
-
Constructor Summary
ConstructorDescriptionCreates a new TLspPanController with a navigation default controller model. -
Method Summary
Modifier and TypeMethodDescriptionReturns the cursor to be used while panning (while the triggering mouse button is pressed).Returns the icon that is used to denote using which spot the view is panning.handleAWTEventImpl
(AWTEvent aEvent) Called byhandleAWTEvent
.handleFXEventImpl
(Event aEvent) Called byhandleFXEvent
.boolean
Returns whether or not to use inertia when panning the map.void
setCursorWhilePanning
(Cursor aCursor) Sets the cursor to be used while panning (while the triggering mouse button is pressed).void
setEnableInertia
(boolean aEnableInertia) Enables or disables inertia when panning the map.void
setPanSpotIcon
(ILcdAnchoredIcon aPanSpotIcon) Returns the icon that is used to denote using which spot the view is panning.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
-
TLspPanController
public TLspPanController()Creates a new TLspPanController with a navigation default controller model.
-
-
Method Details
-
isEnableInertia
public boolean isEnableInertia()Returns whether or not to use inertia when panning the map. Inertia causes the controller to keep panning after releasing the mouse.- Returns:
true
if this controller has inertia enabled,false
otherwise.- See Also:
-
setEnableInertia
public void setEnableInertia(boolean aEnableInertia) Enables or disables inertia when panning the map. Inertia causes the controller to keep panning after releasing the mouse.- Parameters:
aEnableInertia
-true
if this controller should enable inertia,false
otherwise.- See Also:
-
setPanSpotIcon
Returns the icon that is used to denote using which spot the view is panning. Note that this icon is only visualized when the view is painted in 3D.- Parameters:
aPanSpotIcon
- The icon which will be used to denote using which spot the view is panning.- See Also:
-
getCursorWhilePanning
Returns the cursor to be used while panning (while the triggering mouse button is pressed).- Returns:
- the pan cursor
-
setCursorWhilePanning
Sets the cursor to be used while panning (while the triggering mouse button is pressed).- Parameters:
aCursor
- the new cursor to use.- See Also:
-
getPanSpotIcon
Returns the icon that is used to denote using which spot the view is panning. Note that this icon is only visualized when the view is painted in 3D.- Returns:
- The icon that is used to denote using which spot the view is panning.
- See Also:
-
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:
aEvent
- 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.
-