Class ALcdGXYChainableController
- All Implemented Interfaces:
ILcdAWTEventListener,ILcdStatusSource,ILcdGXYChainableController,ILcdGXYController,Serializable
- Direct Known Subclasses:
ALcdGXYTouchChainableController,TLcdGXYTouchNavigateController,TLcdGXYTouchNewController,TLcdGXYTouchSelectEditController,TLcdMapTouchRulerController
ILcdGXYChainableController that implements
startInteraction, terminateInteraction and paint to call a
corresponding implementation ( see startInteractionImpl(com.luciad.view.gxy.ILcdGXYView), terminateInteractionImpl(com.luciad.view.gxy.ILcdGXYView)
and paintImpl(java.awt.Graphics) ) and then call the same method in the next controller.
ILcdAWTEventListener.handleAWTEvent(java.awt.AWTEvent) should be handled in a similar way, but this is left
to the implementations.- Since:
- 10.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatusListener(ILcdStatusListener aStatusListener) Registers the given listener so it will receive status events from this source.voidThis method will append the passed controller to the end of the chain.Returns a reference to the controller that is located after this one in a chain, or null if this controller is the last element of the chain.voidEnables the controller to give visual feedback on the current user interactions.protected voidThe specific implementation ofpaintfor this controller.voidremoveStatusListener(ILcdStatusListener aStatusListener) Removes the specified listener so it is no longer notified.voidThis method sets the next controller in the chain for this controller.voidstartInteraction(ILcdGXYView aGXYView) Sets up the controller to receive input through the view passed.protected voidstartInteractionImpl(ILcdGXYView aGXYView) The specific implementation ofstartInteractionfor this controller.voidterminateInteraction(ILcdGXYView aGXYView) Releases a few items.protected voidterminateInteractionImpl(ILcdGXYView aGXYView) The specific implementation ofterminateInteractionfor this controller.Methods inherited from class com.luciad.view.gxy.controller.ALcdGXYController
asGXYController, fireStatusEvent, getCursor, getGXYView, getIcon, getName, getShortDescription, isTraceOn, registerInstance, retrieveGXYViewXYWorldTransformation, setClassTraceOn, setCursor, setGXYView, setIcon, setName, setShortDescription, setTraceOn, viewRepaintMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.input.ILcdAWTEventListener
handleAWTEventMethods inherited from interface com.luciad.view.gxy.ILcdGXYController
getCursor, getIcon, getLayered, getName, getShortDescription, viewRepaint
-
Constructor Details
-
ALcdGXYChainableController
public ALcdGXYChainableController()
-
-
Method Details
-
getNextGXYController
Description copied from interface:ILcdGXYChainableControllerReturns a reference to the controller that is located after this one in a chain, or null if this controller is the last element of the chain.- Specified by:
getNextGXYControllerin interfaceILcdGXYChainableController- Returns:
- a reference to the next controller.
- See Also:
-
setNextGXYController
Description copied from interface:ILcdGXYChainableControllerThis method sets the next controller in the chain for this controller. You can set null if you want the chain to end. This method does not start or terminate any interaction. If you need to replace a controller while it's being used you are responsible for properly terminating and starting it yourself.- Specified by:
setNextGXYControllerin interfaceILcdGXYChainableController- Parameters:
aNext- the reference to the controller that will be the next element in the chain- See Also:
-
appendGXYController
Description copied from interface:ILcdGXYChainableControllerThis method will append the passed controller to the end of the chain. The controller will be the stored as the next controller in the last element of the current chain.- Specified by:
appendGXYControllerin interfaceILcdGXYChainableController- Parameters:
aEnd- the controller to be appended to the end of the chain.
-
addStatusListener
Description copied from interface:ILcdStatusSourceRegisters the given listener so it will receive status events from this source.
In case you need to register a listener which keeps a reference to an object with a shorter life-time than this status source, you can use a
ALcdWeakStatusListenerinstance as status listener.- Specified by:
addStatusListenerin interfaceILcdStatusSource- Overrides:
addStatusListenerin classALcdGXYController- Parameters:
aStatusListener- The listener to be notified when the status has changed.
-
removeStatusListener
Description copied from interface:ILcdStatusSourceRemoves the specified listener so it is no longer notified.- Specified by:
removeStatusListenerin interfaceILcdStatusSource- Overrides:
removeStatusListenerin classALcdGXYController- Parameters:
aStatusListener- The listener to remove.
-
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.Sets the cursor on the view and sets the view for which this controller is now active. Sends out a status event based on the
short description.This method also calls
startInteraction(com.luciad.view.gxy.ILcdGXYView)on the next controller. OverridestartInteractionImpl(com.luciad.view.gxy.ILcdGXYView)if you want to add your own behavior to this controller.- Specified by:
startInteractionin interfaceILcdGXYController- Overrides:
startInteractionin classALcdGXYController- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerwill interact with.- See Also:
-
terminateInteraction
Releases a few items. Can be redefined but this 'super' method should be called too.This method also calls
terminateInteraction(com.luciad.view.gxy.ILcdGXYView)on the next controller. OverrideterminateInteractionImpl(com.luciad.view.gxy.ILcdGXYView)if you want to add your own behavior to this controller.- Specified by:
terminateInteractionin interfaceILcdGXYController- Overrides:
terminateInteractionin classALcdGXYController- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerinteracted with.- See Also:
-
paint
Enables the controller to give visual feedback on the current user interactions. Note that the controller is responsible for repainting the view.Empty implementation. Redefine this method to render on the Graphics on which the view is rendered.
This method also calls
paint(java.awt.Graphics)on the next controller. OverridepaintImpl(java.awt.Graphics)if you want to add your own behavior to this controller.- Specified by:
paintin interfaceILcdGXYController- Overrides:
paintin classALcdGXYController- Parameters:
aGraphics- the Graphics on which the view was rendered.- See Also:
-
startInteractionImpl
The specific implementation ofstartInteractionfor this controller.- Parameters:
aGXYView- the view to start interaction with.
-
terminateInteractionImpl
The specific implementation ofterminateInteractionfor this controller.- Parameters:
aGXYView- the view to terminate interaction with.
-
paintImpl
The specific implementation ofpaintfor this controller.- Parameters:
aGraphics- the graphics to be used for painting.
-