Interface ILcdGXYController
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
ILcdGXYChainableController
- All Known Implementing Classes:
ALcdGXYChainableController,ALcdGXYConfinedTouchChainableController,ALcdGXYController,ALcdGXYSmartController,ALcdGXYTouchChainableController,TLcdAdvancedMapRulerController,TLcdAzimuthRangeController,TLcdGRIBGXYController,TLcdGXYCenterRasterController,TLcdGXYCompositeController,TLcdGXYContinuousPanController,TLcdGXYDragRectangleController,TLcdGXYEditController,TLcdGXYEditController2,TLcdGXYInteractiveLabelsController,TLcdGXYMagnifierController,TLcdGXYNavigateController,TLcdGXYNewController,TLcdGXYNewController2,TLcdGXYNoopController,TLcdGXYOverviewController,TLcdGXYPanController,TLcdGXYRotateController,TLcdGXYSelectController,TLcdGXYSelectController2,TLcdGXYTouchNavigateController,TLcdGXYTouchNewController,TLcdGXYTouchSelectEditController,TLcdGXYZoomController,TLcdGXYZoomWheelController,TLcdMagneticNorthGXYController,TLcdMapGridRulerController,TLcdMapRulerController,TLcdMapTouchRulerController,TLcdTerrainProfileController,TLcdTerrainRulerController
ILcdGXYView.
When a controller is assigned to a view (using ILcdGXYView.setGXYController),
startInteraction is called.
From then on the controller is responsible for interpreting the user interaction on the view, until
terminateInteraction is called for that view.
The user interaction can originate from a key stroke, the mouse, or any other input device.
The controller implementation can therefore be a MouseListener, MouseMotionListener, KeyListener, ... implementation.
Interpreting the user interaction may consist of changing the internal state of the view or any of its constituents. For example, a zoom controller may change the views scale, while a select controller may change the selection state of an object in a layer which is part of the view. Note that consumption of user interaction is not part of this interface, but is part of other interfaces the controller may implement, such as MouseListener, MouseMotionListener, ... .
The controller may indicate how user interaction is interpreted by rendering visual feedback on the
view using the paint method. Note that the controller is responsible for
repainting the view as needed.
ILcdIcon.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the cursor that will be displayed on a view when this controller is active for that view.getIcon()Returns an icon to visualize the interaction implemented.default ILcdLayeredReturns the layers associated with this controller.getName()Returns a name for this controller that enables to determine the interaction that can be performed with this controller.Returns a short description that enables to determine the interaction that can be performed with this controller.voidEnables the controller to give visual feedback on the current user interactions.voidstartInteraction(ILcdGXYView aGXYView) Sets up the controller to receive input through the view passed.voidterminateInteraction(ILcdGXYView aGXYView) Configures the controller to no longer receive input through the view passed.voidviewRepaint(ILcdGXYView aGXYView) Deprecated.
-
Method Details
-
startInteraction
Sets up the controller to receive input through the view passed.All
ILcdGXYViewimplementations that support interaction call this method when the controller has been made active withsetGXYControlleron the view, so this method shouldn't normally be called directly. Note that most view implementations add the controller as listener if appropriate before calling this method.- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerwill interact with.- See Also:
-
terminateInteraction
Configures the controller to no longer receive input through the view passed.All
ILcdGXYViewimplementations that support interaction call this method when another controller has been made active withsetGXYControlleron the view, so this method shouldn't normally be called directly. Note that most view implementations remove the controller as listener if appropriate before calling this method.- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerinteracted with.- See Also:
-
viewRepaint
Deprecated.Use the methodpaint(java.awt.Graphics).This method shall be called by anILcdGXYViewafter painting/drawing all itsILcdGXYLayers. It allows thisILcdGXYControllerto draw specific information on top of theILcdGXYViewit is set to.- Parameters:
aGXYView- theILcdGXYViewto draw on.
-
paint
Enables the controller to give visual feedback on the current user interactions. Note that the controller is responsible for repainting the view.- Parameters:
aGraphics- the Graphics to paint on.
-
getLayered
Returns the layers associated with this controller. A view using this controller should visualize the layers of its active controller and take them into account for label placement.Custom implementations of this method should take care to return the same
ILcdLayeredinstance every time this method is called to guarantee correct working of theILcdLayeredinterface.- Returns:
- an ILcdLayered object with GXY layers, or null if this controller has no layers.
- Since:
- 2020.1
-
getCursor
Cursor getCursor()Returns the cursor that will be displayed on a view when this controller is active for that view.- Returns:
- the cursor that will be displayed on a view when this controller is active for that view.
-
getName
String getName()Returns a name for this controller that enables to determine the interaction that can be performed with this controller. For example 'zoom' for a zoom controller.- Returns:
- a name for this controller
-
getShortDescription
String getShortDescription()Returns a short description that enables to determine the interaction that can be performed with this controller. For example 'Zoom in and out on a view' for a zoom controller.- Returns:
- a short description for this
ILcdGXYController.
-
getIcon
ILcdIcon getIcon()Returns an icon to visualize the interaction implemented. For example, an icon of a magnifying glass for a zoom controller.- Returns:
- an icon to visualize the interaction implemented.
-
paint(java.awt.Graphics).