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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStatusListener
(ILcdStatusListener aStatusListener) Registers the given listener so it will receive status events from this source.void
This 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.void
Enables the controller to give visual feedback on the current user interactions.protected void
The specific implementation ofpaint
for this controller.void
removeStatusListener
(ILcdStatusListener aStatusListener) Removes the specified listener so it is no longer notified.void
This method sets the next controller in the chain for this controller.void
startInteraction
(ILcdGXYView aGXYView) Sets up the controller to receive input through the view passed.protected void
startInteractionImpl
(ILcdGXYView aGXYView) The specific implementation ofstartInteraction
for this controller.void
terminateInteraction
(ILcdGXYView aGXYView) Releases a few items.protected void
terminateInteractionImpl
(ILcdGXYView aGXYView) The specific implementation ofterminateInteraction
for 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, viewRepaint
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.input.ILcdAWTEventListener
handleAWTEvent
Methods 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:ILcdGXYChainableController
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.- Specified by:
getNextGXYController
in interfaceILcdGXYChainableController
- Returns:
- a reference to the next controller.
- See Also:
-
setNextGXYController
Description copied from interface:ILcdGXYChainableController
This 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:
setNextGXYController
in interfaceILcdGXYChainableController
- Parameters:
aNext
- the reference to the controller that will be the next element in the chain- See Also:
-
appendGXYController
Description copied from interface:ILcdGXYChainableController
This 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:
appendGXYController
in interfaceILcdGXYChainableController
- Parameters:
aEnd
- the controller to be appended to the end of the chain.
-
addStatusListener
Description copied from interface:ILcdStatusSource
Registers 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
ALcdWeakStatusListener
instance as status listener.- Specified by:
addStatusListener
in interfaceILcdStatusSource
- Overrides:
addStatusListener
in classALcdGXYController
- Parameters:
aStatusListener
- The listener to be notified when the status has changed.
-
removeStatusListener
Description copied from interface:ILcdStatusSource
Removes the specified listener so it is no longer notified.- Specified by:
removeStatusListener
in interfaceILcdStatusSource
- Overrides:
removeStatusListener
in classALcdGXYController
- Parameters:
aStatusListener
- The listener to remove.
-
startInteraction
Sets up the controller to receive input through the view passed.All
ILcdGXYView
implementations that support interaction call this method when the controller has been made active withsetGXYController
on 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:
startInteraction
in interfaceILcdGXYController
- Overrides:
startInteraction
in classALcdGXYController
- Parameters:
aGXYView
- theILcdGXYView
thisILcdGXYController
will 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:
terminateInteraction
in interfaceILcdGXYController
- Overrides:
terminateInteraction
in classALcdGXYController
- Parameters:
aGXYView
- theILcdGXYView
thisILcdGXYController
interacted 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:
paint
in interfaceILcdGXYController
- Overrides:
paint
in classALcdGXYController
- Parameters:
aGraphics
- the Graphics on which the view was rendered.- See Also:
-
startInteractionImpl
The specific implementation ofstartInteraction
for this controller.- Parameters:
aGXYView
- the view to start interaction with.
-
terminateInteractionImpl
The specific implementation ofterminateInteraction
for this controller.- Parameters:
aGXYView
- the view to terminate interaction with.
-
paintImpl
The specific implementation ofpaint
for this controller.- Parameters:
aGraphics
- the graphics to be used for painting.
-