public class TLspZoomController extends ALspController
getScaleLevelProvider
.
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.Constructor and Description |
---|
TLspZoomController()
Creates a new TLspZoomController with a default zoom controller model.
|
Modifier and Type | Method and Description |
---|---|
Cursor |
getCursorWhileZooming()
Returns the cursor to be used while zooming (while the triggering mouse button is pressed).
|
double |
getMouseWheelZoomExaggeration()
Returns the zoom exaggeration sensitivity which is used to determine the magnitude of the
speed-up effect that occurs when rapidly zooming in or out using the mouse wheel.
|
double |
getMouseWheelZoomFactor()
Returns the mouse wheel zoom factor used to handle mouse wheel movements.
|
ILspScaleLevelProvider |
getScaleLevelProvider()
Returns the scale level provider used for ctrl-zoom, if enabled.
|
ILcdAnchoredIcon |
getZoomSpotIcon()
Returns the icon that is used to denote to which spot the view is zooming.
|
AWTEvent |
handleAWTEventImpl(AWTEvent aEvent)
Called by
handleAWTEvent . |
javafx.event.Event |
handleFXEventImpl(javafx.event.Event aEvent)
Called by
handleFXEvent . |
boolean |
isEnableSnapToScaleLevels()
Returns if snapping to scale levels is enabled when holding the control key.
|
void |
setCursorWhileZooming(Cursor aCursor)
Sets the cursor to be used while zooming (while the triggering mouse button is pressed).
|
void |
setEnableSnapToScaleLevels(boolean aEnableSnapToScaleLevels)
Enables or disables snapping to scale levels when holding the control key.
|
void |
setMouseWheelZoomExaggeration(double aMouseWheelZoomExaggeration)
Sets the zoom exaggeration which is used to determine the magnitude of the speed-up
effect that occurs when rapidly zooming in or out using the mouse wheel.
|
void |
setMouseWheelZoomFactor(double aMouseWheelZoomFactor)
Sets the mouse wheel zoom factor used to handle mouse wheel movements.
|
void |
setScaleLevelProvider(ILspScaleLevelProvider aScaleLevelProvider)
Sets the scale level provider used for ctrl-zoom.
|
void |
setZoomSpotIcon(ILcdAnchoredIcon aZoomSpotIcon)
Returns the icon that is used to denote to which spot the view is zooming.
|
void |
startInteraction(ILspView aView)
Called to start interacting with the controller.
|
void |
terminateInteraction(ILspView aView)
Terminates interaction with this controller.
|
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
public TLspZoomController()
public double getMouseWheelZoomFactor()
setMouseWheelZoomFactor(double)
public void setMouseWheelZoomFactor(double aMouseWheelZoomFactor)
1.0
. This value controls the change
in scale. E.g. if this value is 2.0
and the current scale is
1.0
, then the scale after zooming in will be 2.0
.
The scale after zooming out will be 0.5
.
By default this value is 1.1.
Note: the zoom factor will also be influenced by
MouseWheelEvent.getScrollAmount()
.
aMouseWheelZoomFactor
- the mouse wheel zoom factor.public double getMouseWheelZoomExaggeration()
setMouseWheelZoomExaggeration(double)
public void setMouseWheelZoomExaggeration(double aMouseWheelZoomExaggeration)
Sets the zoom exaggeration which is used to determine the magnitude of the speed-up effect that occurs when rapidly zooming in or out using the mouse wheel. The zoom exaggeration sensitivity allows users to tweak the sensitivity of the speed-up effect without having to alter any algorithms.
Typically this is a value larger than or equal to 1.0
. By default this value
is 1.0. When using a larger value, zooming in/out
will accelerate faster when rapidly using the mouse wheel.
aMouseWheelZoomExaggeration
- the zoom exaggeration sensitivity.public void setEnableSnapToScaleLevels(boolean aEnableSnapToScaleLevels)
aEnableSnapToScaleLevels
- true
to enable snapping to scale levels.isEnableSnapToScaleLevels()
,
setScaleLevelProvider(ILspScaleLevelProvider)
public boolean isEnableSnapToScaleLevels()
setEnableSnapToScaleLevels(boolean)
public ILspScaleLevelProvider getScaleLevelProvider()
setScaleLevelProvider(ILspScaleLevelProvider)
public void setScaleLevelProvider(ILspScaleLevelProvider aScaleLevelProvider)
Sets the scale level provider used for ctrl-zoom.
By default, TLspRasterBasedScaleLevelProvider
is
used.
When an empty array, or null
is returned, no zooming will be performed.
aScaleLevelProvider
- the scale level provider used for ctrl-zoom.getScaleLevelProvider()
,
setEnableSnapToScaleLevels(boolean)
public void startInteraction(ILspView aView)
ALspController
ILspView.setController(com.luciad.view.lightspeed.controller.ILspController)
.
This implementation sends out a status event based on the short description
.
It also calls startInteraction
on the next controller. Override startInteractionImpl
if you want to add your own behavior to this
controller.startInteraction
in interface ILspController
startInteraction
in class ALspController
aView
- the view the controller operates onpublic void terminateInteraction(ILspView aView)
ALspController
ILspView.setController(com.luciad.view.lightspeed.controller.ILspController)
.
This implementation also calls terminateInteraction
on the next controller.
Override terminateInteractionImpl
if you want to add your own behavior
to this controller.terminateInteraction
in interface ILspController
terminateInteraction
in class ALspController
aView
- the view the controller was operating onpublic AWTEvent handleAWTEventImpl(AWTEvent aEvent)
ALspController
handleAWTEvent
.
Returns null
when the controller consumed the event or a partially consumed event
when the controller partially consumed the event (which could happen with
TLcdTouchEvent
s). When the controller did not use the given event, it is returned
unaltered.handleAWTEventImpl
in class ALspController
aEvent
- the event to be handled.null
when the input event was consumed, the (possibly modified) input
event when it was (partially) consumed.public javafx.event.Event handleFXEventImpl(javafx.event.Event aEvent)
ALspController
handleFXEvent
.
Returns null
when the controller consumed the event. When the controller did not use the
given event, it is returned unaltered.handleFXEventImpl
in class ALspController
aEvent
- the event to be handled.null
when the input event was consumed, the (possibly modified) input
event when it was (partially) consumed.public void setZoomSpotIcon(ILcdAnchoredIcon aZoomSpotIcon)
aZoomSpotIcon
- The icon which will be used to denote to which spot the view is zooming.public ILcdAnchoredIcon getZoomSpotIcon()
public Cursor getCursorWhileZooming()
public void setCursorWhileZooming(Cursor aCursor)
aCursor
- the new Cursor to use.ALspController.setCursor(Cursor)