Class TLcdGXYTouchNavigateController
- All Implemented Interfaces:
ILcdAWTEventListener
,ILcdStatusSource
,ILcdGXYChainableController
,ILcdGXYController
,Serializable
TLcdTouchPoint
s which are not-consumed, and marks the
TLcdTouchPoint
s it uses as consumed, similar to the ALcdGXYTouchChainableController
.- Since:
- 10.0
- See Also:
-
Constructor Summary
ConstructorDescriptionCreates a new navigation controller with a defaultTLcdGXYNavigateControllerModel
.TLcdGXYTouchNavigateController
(TLcdGXYNavigateControllerModel aControllerModel) Creates a new navigation controller based onaControllerModel
.TLcdGXYTouchNavigateController
(TLcdGXYNavigateControllerModel aControllerModel, boolean aShouldRotate, boolean aShouldScale, boolean aShouldTranslate) Creates a new navigation controller based onaControllerModel
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
This method will append the passed controller to the end of the chain.int
Returns the threshold for move events.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
handleAWTEvent
(AWTEvent aEvent) This is method is called when the target of the listener has a new AWTEvent available.void
Enables the controller to give visual feedback on the current user interactions.protected void
The specific implementation ofpaint
for this controller.protected void
setGXYView
(ILcdGXYView aGXYView) Sets theILcdGXYView
the controller is interacting with.void
setMoveThreshold
(int aMoveThreshold) Sets the threshold for move events.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.ALcdGXYChainableController
addStatusListener, removeStatusListener
Methods inherited from class com.luciad.view.gxy.controller.ALcdGXYController
asGXYController, fireStatusEvent, getCursor, getGXYView, getIcon, getName, getShortDescription, isTraceOn, registerInstance, retrieveGXYViewXYWorldTransformation, setClassTraceOn, setCursor, 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.view.gxy.ILcdGXYController
getCursor, getIcon, getLayered, getName, getShortDescription, viewRepaint
-
Constructor Details
-
TLcdGXYTouchNavigateController
public TLcdGXYTouchNavigateController()Creates a new navigation controller with a defaultTLcdGXYNavigateControllerModel
.
-
-
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
- Overrides:
getNextGXYController
in classALcdGXYChainableController
- 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
- Overrides:
setNextGXYController
in classALcdGXYChainableController
- 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
- Overrides:
appendGXYController
in classALcdGXYChainableController
- Parameters:
aEnd
- the controller to be appended to the end of the chain.
-
startInteractionImpl
Description copied from class:ALcdGXYChainableController
The specific implementation ofstartInteraction
for this controller.- Overrides:
startInteractionImpl
in classALcdGXYChainableController
- Parameters:
aGXYView
- the view to start interaction with.
-
terminateInteractionImpl
Description copied from class:ALcdGXYChainableController
The specific implementation ofterminateInteraction
for this controller.- Overrides:
terminateInteractionImpl
in classALcdGXYChainableController
- Parameters:
aGXYView
- the view to terminate interaction with.
-
paintImpl
Description copied from class:ALcdGXYChainableController
The specific implementation ofpaint
for this controller.- Overrides:
paintImpl
in classALcdGXYChainableController
- Parameters:
aGraphics
- the graphics to be used for painting.
-
startInteraction
Description copied from class:ALcdGXYChainableController
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
ALcdGXYChainableController.startInteraction(com.luciad.view.gxy.ILcdGXYView)
on the next controller. OverrideALcdGXYChainableController.startInteractionImpl(com.luciad.view.gxy.ILcdGXYView)
if you want to add your own behavior to this controller.- Specified by:
startInteraction
in interfaceILcdGXYController
- Overrides:
startInteraction
in classALcdGXYChainableController
- Parameters:
aGXYView
- theILcdGXYView
thisILcdGXYController
will interact with.- See Also:
-
terminateInteraction
Description copied from class:ALcdGXYChainableController
Releases a few items. Can be redefined but this 'super' method should be called too.This method also calls
ALcdGXYChainableController.terminateInteraction(com.luciad.view.gxy.ILcdGXYView)
on the next controller. OverrideALcdGXYChainableController.terminateInteractionImpl(com.luciad.view.gxy.ILcdGXYView)
if you want to add your own behavior to this controller.- Specified by:
terminateInteraction
in interfaceILcdGXYController
- Overrides:
terminateInteraction
in classALcdGXYChainableController
- Parameters:
aGXYView
- theILcdGXYView
thisILcdGXYController
interacted with.- See Also:
-
paint
Description copied from class:ALcdGXYChainableController
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
ALcdGXYChainableController.paint(java.awt.Graphics)
on the next controller. OverrideALcdGXYChainableController.paintImpl(java.awt.Graphics)
if you want to add your own behavior to this controller.- Specified by:
paint
in interfaceILcdGXYController
- Overrides:
paint
in classALcdGXYChainableController
- Parameters:
aGraphics
- the Graphics on which the view was rendered.- See Also:
-
setGXYView
Description copied from class:ALcdGXYController
Sets theILcdGXYView
the controller is interacting with.This method is called when
ILcdGXYView.setGXYController
is used to set anILcdGXYController
active on anILcdGXYView
.- Overrides:
setGXYView
in classALcdGXYController
- Parameters:
aGXYView
- the view the controller is interacting with- See Also:
-
handleAWTEvent
Description copied from interface:ILcdAWTEventListener
This is method is called when the target of the listener has a new AWTEvent available.- Parameters:
aEvent
- The event to be handled.
-
setMoveThreshold
public void setMoveThreshold(int aMoveThreshold) Sets the threshold for move events.
A move event will only be handled if the move exceeds the threshold in either the x or y direction.
- Parameters:
aMoveThreshold
- the move threshold- See Also:
-
getMoveThreshold
public int getMoveThreshold()Returns the threshold for move events.
- Returns:
- the threshold for move events
- See Also:
-