public class TLcdGXYTouchNavigateController extends ALcdGXYChainableController
TLcdTouchPoint
s which are not-consumed, and marks the
TLcdTouchPoint
s it uses as consumed, similar to the ALcdGXYTouchChainableController
.Constructor and Description |
---|
TLcdGXYTouchNavigateController()
Creates a new navigation controller with a default
TLcdGXYNavigateControllerModel . |
TLcdGXYTouchNavigateController(TLcdGXYNavigateControllerModel aControllerModel)
Creates a new navigation controller based on
aControllerModel . |
TLcdGXYTouchNavigateController(TLcdGXYNavigateControllerModel aControllerModel,
boolean aShouldRotate,
boolean aShouldScale,
boolean aShouldTranslate)
Creates a new navigation controller based on
aControllerModel . |
Modifier and Type | Method and Description |
---|---|
void |
appendGXYController(ILcdGXYChainableController aEnd)
This method will append the passed controller to the end of the chain.
|
int |
getMoveThreshold()
Returns the threshold for move events.
|
ILcdGXYChainableController |
getNextGXYController()
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 |
paint(Graphics aGraphics)
Enables the controller to give visual feedback on the current user interactions.
|
protected void |
paintImpl(Graphics aGraphics)
The specific implementation of
paint for this controller. |
protected void |
setGXYView(ILcdGXYView aGXYView)
Sets the
ILcdGXYView the controller is interacting with. |
void |
setMoveThreshold(int aMoveThreshold)
Sets the threshold for move events.
|
void |
setNextGXYController(ILcdGXYChainableController aNext)
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 of
startInteraction for this controller. |
void |
terminateInteraction(ILcdGXYView aGXYView)
Releases a few items.
|
protected void |
terminateInteractionImpl(ILcdGXYView aGXYView)
The specific implementation of
terminateInteraction for this controller. |
addStatusListener, removeStatusListener
asGXYController, fireStatusEvent, getCursor, getGXYView, getIcon, getName, getShortDescription, isTraceOn, registerInstance, retrieveGXYViewXYWorldTransformation, setClassTraceOn, setCursor, setIcon, setName, setShortDescription, setTraceOn, viewRepaint
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCursor, getIcon, getLayered, getName, getShortDescription, viewRepaint
public TLcdGXYTouchNavigateController()
TLcdGXYNavigateControllerModel
.public TLcdGXYTouchNavigateController(TLcdGXYNavigateControllerModel aControllerModel)
aControllerModel
.aControllerModel
- the model which will do the actual transformation of the viewpublic TLcdGXYTouchNavigateController(TLcdGXYNavigateControllerModel aControllerModel, boolean aShouldRotate, boolean aShouldScale, boolean aShouldTranslate)
aControllerModel
.aControllerModel
- the model which will do the actual transformation of the viewaShouldRotate
- boolean indicating whether a rotation should be applied (see TLcdGXYNavigateControllerModel.transform(com.luciad.view.gxy.ILcdGXYView,
java.util.List, java.util.List, boolean, boolean, boolean)
aShouldScale
- boolean indicating whether a scaling should be applied (see TLcdGXYNavigateControllerModel.transform(com.luciad.view.gxy.ILcdGXYView,
java.util.List, java.util.List, boolean, boolean, boolean)
aShouldTranslate
- boolean indicating whether a translation should be applied (see TLcdGXYNavigateControllerModel.transform(com.luciad.view.gxy.ILcdGXYView,
java.util.List, java.util.List, boolean, boolean, boolean)
public ILcdGXYChainableController getNextGXYController()
ILcdGXYChainableController
getNextGXYController
in interface ILcdGXYChainableController
getNextGXYController
in class ALcdGXYChainableController
ILcdGXYChainableController.setNextGXYController(ILcdGXYChainableController)
public void setNextGXYController(ILcdGXYChainableController aNext)
ILcdGXYChainableController
setNextGXYController
in interface ILcdGXYChainableController
setNextGXYController
in class ALcdGXYChainableController
aNext
- the reference to the controller that will be the next element in the chainILcdGXYChainableController.getNextGXYController()
public void appendGXYController(ILcdGXYChainableController aEnd)
ILcdGXYChainableController
appendGXYController
in interface ILcdGXYChainableController
appendGXYController
in class ALcdGXYChainableController
aEnd
- the controller to be appended to the end of the chain.protected void startInteractionImpl(ILcdGXYView aGXYView)
ALcdGXYChainableController
startInteraction
for this controller.startInteractionImpl
in class ALcdGXYChainableController
aGXYView
- the view to start interaction with.protected void terminateInteractionImpl(ILcdGXYView aGXYView)
ALcdGXYChainableController
terminateInteraction
for this controller.terminateInteractionImpl
in class ALcdGXYChainableController
aGXYView
- the view to terminate interaction with.protected void paintImpl(Graphics aGraphics)
ALcdGXYChainableController
paint
for this controller.paintImpl
in class ALcdGXYChainableController
aGraphics
- the graphics to be used for painting.public void startInteraction(ILcdGXYView aGXYView)
ALcdGXYChainableController
All ILcdGXYView
implementations that support interaction call this method when the controller
has been made active with setGXYController
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.
Override ALcdGXYChainableController.startInteractionImpl(com.luciad.view.gxy.ILcdGXYView)
if you want to add your own behavior to this controller.
startInteraction
in interface ILcdGXYController
startInteraction
in class ALcdGXYChainableController
aGXYView
- the ILcdGXYView
this ILcdGXYController
will interact with.ALcdGXYChainableController.startInteractionImpl(com.luciad.view.gxy.ILcdGXYView)
public void terminateInteraction(ILcdGXYView aGXYView)
ALcdGXYChainableController
This method also calls ALcdGXYChainableController.terminateInteraction(com.luciad.view.gxy.ILcdGXYView)
on the next controller.
Override ALcdGXYChainableController.terminateInteractionImpl(com.luciad.view.gxy.ILcdGXYView)
if you want to add your own behavior to this controller.
terminateInteraction
in interface ILcdGXYController
terminateInteraction
in class ALcdGXYChainableController
aGXYView
- the ILcdGXYView
this ILcdGXYController
interacted with.ALcdGXYChainableController.terminateInteractionImpl(com.luciad.view.gxy.ILcdGXYView)
public void paint(Graphics aGraphics)
ALcdGXYChainableController
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.
Override ALcdGXYChainableController.paintImpl(java.awt.Graphics)
if you want to add your own behavior to this controller.
paint
in interface ILcdGXYController
paint
in class ALcdGXYChainableController
aGraphics
- the Graphics on which the view was rendered.ALcdGXYChainableController.paintImpl(java.awt.Graphics)
protected void setGXYView(ILcdGXYView aGXYView)
ALcdGXYController
ILcdGXYView
the controller is interacting with.
This method is called when ILcdGXYView.setGXYController
is used to set an
ILcdGXYController
active on an ILcdGXYView
.
setGXYView
in class ALcdGXYController
aGXYView
- the view the controller is interacting withALcdGXYController.startInteraction(com.luciad.view.gxy.ILcdGXYView)
,
ILcdGXYView.setGXYController(com.luciad.view.gxy.ILcdGXYController)
public void handleAWTEvent(AWTEvent aEvent)
ILcdAWTEventListener
aEvent
- The event to be handled.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.
aMoveThreshold
- the move thresholdgetMoveThreshold()
public int getMoveThreshold()
Returns the threshold for move events.
setMoveThreshold(int)