public class TLspRecenterProjectionController extends ALspController
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
Constructor and Description |
---|
TLspRecenterProjectionController()
Creates 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.
|
Modifier and Type | Method and Description |
---|---|
AWTEvent |
handleAWTEventImpl(AWTEvent aEvent)
Called by
handleAWTEvent . |
javafx.event.Event |
handleFXEventImpl(javafx.event.Event aEvent)
Called by
handleFXEvent . |
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
public TLspRecenterProjectionController()
public TLspRecenterProjectionController(Cursor aCursor)
aCursor
- the cursor to use when the controller is activepublic 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.