Class TLspRecenterProjectionController
java.lang.Object
com.luciad.view.lightspeed.controller.ALspController
com.luciad.view.lightspeed.controller.navigation.TLspRecenterProjectionController
- All Implemented Interfaces:
ILcdAWTEventListener
,ILspController
When active on an
ILspView
, this ILspController
will try to center the ILcdProjection
that is currently set
on the ILspView
on the location that was clicked.
For example, if the ILcdProjection
is an ILcdAzimuthal
projection, this ILspController
will transform the clicked screen
point into a LonLat coordinate and use it to set the originLon and originLat
properties of the ILcdAzimuthal
projection.
Note that the map recenter controller will only work on a view that has an
ILcdGridReference
as a world reference. For any other type of
world reference, the map recenter controller will do nothing.
The map recenter controller only supports the following projections:
ILcdAzimuthal
ILcdCylindrical
ILcdTransverseCylindrical
ILcdObliqueCylindrical
ILcdConic
TLcdPolyconic
- Since:
- 2012.0
-
Constructor Summary
ConstructorDescriptionCreates a controller used to center a 2D map with a crosshair cursor.TLspRecenterProjectionController
(Cursor aCursor) Creates a controller used to center a 2D map with the given cursor. -
Method Summary
Modifier and TypeMethodDescriptionhandleAWTEventImpl
(AWTEvent aEvent) Called byhandleAWTEvent
.handleFXEventImpl
(Event aEvent) Called byhandleFXEvent
.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, startInteraction, startInteractionImpl, terminateInteraction, terminateInteractionImpl
-
Constructor Details
-
TLspRecenterProjectionController
public TLspRecenterProjectionController()Creates a controller used to center a 2D map with a crosshair cursor. -
TLspRecenterProjectionController
Creates a controller used to center a 2D map with the given cursor.- Parameters:
aCursor
- the cursor to use when the controller is active
-
-
Method Details
-
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.
-