Package com.luciad.view.gxy.controller
Class TLcdGXYPanController
java.lang.Object
com.luciad.view.gxy.controller.ALcdGXYController
com.luciad.view.gxy.controller.ALcdGXYSmartController
com.luciad.view.gxy.controller.TLcdGXYPanController
- All Implemented Interfaces:
ILcdUndoableSource
,ILcdAWTEventListener
,ILcdStatusSource
,ILcdGXYChainableController
,ILcdGXYController
,KeyListener
,MouseListener
,MouseMotionListener
,Serializable
,EventListener
- Direct Known Subclasses:
TLcdGXYContinuousPanController
@Deprecated
public class TLcdGXYPanController
extends ALcdGXYSmartController
implements MouseListener, MouseMotionListener, ILcdUndoableSource, ILcdGXYChainableController
Deprecated.
The
TLcdGXYPanController
can be used for performing a pan on
an ILcdGXYView
.
By default, a translated copy of the view is shown while panning,
providing panning performance that is independent of the view paint time.
Alternatively, the view can be repainted while panning, keeping the entire view contents visible
at all times.
See setDragViewOnPan(boolean)
to enable this behavior.
This controller supports undo/redo by means of adding an ILcdUndoableListener
using ALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
.- See Also:
-
Constructor Summary
ConstructorDescriptionDeprecated.Creates a pan controller that responds to the left mouse button.TLcdGXYPanController
(boolean aRegisterInstance) Deprecated.use the constructor without parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPropertyChangeListener
(PropertyChangeListener aPropertyChangeListener) Deprecated.void
Deprecated.This method will append the passed controller to the end of the chain.void
doPan
(int aDeltaX, int aDeltaY) Deprecated.Performs a pan of (aDeltaX, aDeltaY) in AWT coordinate space.void
doPan
(int aDeltaX, int aDeltaY, boolean aSaveInHistoryFlag) Deprecated.protected void
Deprecated.Invoked by the paint() method.Deprecated.Returns the filter specifying to what mouse events the controller should respond to.Deprecated.int
Deprecated.Deprecated.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.int
Deprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support.int
Deprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support.void
handleAWTEvent
(AWTEvent aEvent) Deprecated.This is method is called when the target of the listener has a new AWTEvent available.boolean
Deprecated.Returns whether or not the controller will explicitly request a view repaint after every pan operation.boolean
Deprecated.boolean
Deprecated.boolean
Deprecated.Returns whether the view will be repainted while dragging the mouse.boolean
Deprecated.void
Deprecated.void
Deprecated.void
mouseMoved
(MouseEvent me) Deprecated.void
Deprecated.void
Deprecated.void
Deprecated.Enables the controller to give visual feedback on the current user interactions.void
redo()
Deprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support.void
removePropertyChangeListener
(PropertyChangeListener aPropertyChangeListener) Deprecated.void
Deprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support.void
setAutoRepaintView
(boolean aAutoRepaintView) Deprecated.Sets whether or not the controller will explicitly request a view repaint after every pan operation.void
setAWTFilter
(ILcdFilter<AWTEvent> aAWTFilter) Deprecated.Sets the filter specifying to what mouse events the controller should respond to.void
Deprecated.Set the cursor to be used when the mouse is up, or null to reuse the previously configured cursor.void
setDragFrameOnPan
(boolean aDragFrameOnPan) Deprecated.void
setDragImageOnPan
(boolean aDragImageOnPan) Deprecated.void
setDragViewOnPan
(boolean aDragViewOnPan) Deprecated.Enables live repainting of the entire view while panning.void
setDrawLineOnPan
(boolean aDrawLineOnPan) Deprecated.void
setGhostColor
(Color aGhostColor) Deprecated.void
setGhostLineWidth
(int aGhostLineWidth) Deprecated.void
setMouseDownCursor
(Cursor aMouseDownCursor) Deprecated.Set the cursor to be used when the mouse is down.void
Deprecated.This method sets the next controller in the chain for this controller.void
startInteraction
(ILcdGXYView aGXYView) Deprecated.Sets up the controller to receive input through the view passed.void
terminateInteraction
(ILcdGXYView aGXYView) Deprecated.Releases a few items.void
undo()
Deprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support.Methods inherited from class com.luciad.view.gxy.controller.ALcdGXYSmartController
addUndoableListener, doPanGXYView, doZoomGXYView, fireUndoableEvent, getDownPanChars, getDownPanCodes, getLeftPanChars, getLeftPanCodes, getPanAbsDelta, getPanAbsDelta, getRightPanChars, getRightPanCodes, getUndoableListenerCount, getUpPanChars, getUpPanCodes, getZoomInChars, getZoomInCodes, getZoomOutChars, getZoomOutCodes, isDragging, isPanOnMouseDragExit, isPanOnMouseMoveExit, isPanUndoable, isRequestFocusOnMouseEntered, isRequestFocusOnMousePressed, isTraceOn, isZoomUndoable, keyPressed, keyReleased, keyTyped, mouseEntered, mouseExited, removeUndoableListener, setDownPanChars, setDownPanCodes, setIsDragging, setLeftPanChars, setLeftPanCodes, setPanAbsDelta, setPanOnMouseDragExit, setPanOnMouseMoveExit, setPanUndoable, setRequestFocusOnMouseEntered, setRequestFocusOnMousePressed, setRightPanChars, setRightPanCodes, setTraceOn, setUpPanChars, setUpPanCodes, setZoomInChars, setZoomInCodes, setZoomOutChars, setZoomOutCodes, setZoomUndoable, updateViewLocationAfterZoomSFCT
Methods inherited from class com.luciad.view.gxy.controller.ALcdGXYController
addStatusListener, asGXYController, fireStatusEvent, getCursor, getGXYView, getIcon, getName, getShortDescription, registerInstance, removeStatusListener, retrieveGXYViewXYWorldTransformation, setClassTraceOn, setGXYView, setIcon, setName, setShortDescription, 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
Methods inherited from interface com.luciad.gui.ILcdUndoableSource
addUndoableListener, removeUndoableListener
Methods inherited from interface java.awt.event.MouseListener
mouseEntered, mouseExited
-
Constructor Details
-
TLcdGXYPanController
public TLcdGXYPanController()Deprecated.Creates a pan controller that responds to the left mouse button. The controller can be activated usingILcdGXYView.setGXYController(com.luciad.view.gxy.ILcdGXYController)
. -
TLcdGXYPanController
public TLcdGXYPanController(boolean aRegisterInstance) Deprecated.use the constructor without parameters.
-
-
Method Details
-
setCursor
Deprecated.Set the cursor to be used when the mouse is up, or null to reuse the previously configured cursor.- Overrides:
setCursor
in classALcdGXYController
- Parameters:
aCursor
- the Cursor.
-
setMouseDownCursor
Deprecated.Set the cursor to be used when the mouse is down.- Parameters:
aMouseDownCursor
- the Cursor.
-
setGhostLineWidth
public void setGhostLineWidth(int aGhostLineWidth) Deprecated.- Parameters:
aGhostLineWidth
- the Line width of the dragged rectangle.
-
getGhostLineWidth
public int getGhostLineWidth()Deprecated.- See Also:
-
setGhostColor
Deprecated.- Parameters:
aGhostColor
- the Color of the dragged rectangle
-
getGhostColor
Deprecated.- Returns:
- the Color of the dragged rectangle
-
startInteraction
Deprecated.Description copied from class:ALcdGXYController
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
.- Specified by:
startInteraction
in interfaceILcdGXYController
- Overrides:
startInteraction
in classALcdGXYSmartController
- Parameters:
aGXYView
- theILcdGXYView
thisILcdGXYController
will interact with.- See Also:
-
terminateInteraction
Deprecated.Description copied from class:ALcdGXYController
Releases a few items. Can be redefined but this 'super' method should be called too.- Specified by:
terminateInteraction
in interfaceILcdGXYController
- Overrides:
terminateInteraction
in classALcdGXYSmartController
- Parameters:
aGXYView
- theILcdGXYView
thisILcdGXYController
interacted with.- See Also:
-
mouseMoved
Deprecated.- Specified by:
mouseMoved
in interfaceMouseMotionListener
- Overrides:
mouseMoved
in classALcdGXYSmartController
-
paint
Deprecated.Description copied from class:ALcdGXYController
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.
- Specified by:
paint
in interfaceILcdGXYController
- Overrides:
paint
in classALcdGXYController
- Parameters:
aGraphics
- the Graphics on which the view was rendered.
-
mouseDragged
Deprecated.- Specified by:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classALcdGXYSmartController
-
drawGhost
protected void drawGhost(Graphics aGraphics, int aXPressed, int aYPressed, int aXMouse, int aYMouse) Deprecated.Invoked by the paint() method. If isDragImageOnPan() is true, this method obtains an image from the current ILcdGXYView, and paints this image at the current mouse location. The areas not covered by the image are cleared. If isDragFrameOnPan() is true, the area that would be covered by the aforementioned image is outlined with a frame. Finally, if isDrawLineOnPan() is true, a line is drawn from the original mouse position to the current mouse position.- Parameters:
aGraphics
- the Graphics to draw toaXPressed
- the X coordinate where the mouse was pressedaYPressed
- the Y coordinate where the mouse was pressedaXMouse
- the current X coordinate of the mouse cursoraYMouse
- the current Y coordinate of the mouse cursor
-
mouseClicked
Deprecated.- Specified by:
mouseClicked
in interfaceMouseListener
- Overrides:
mouseClicked
in classALcdGXYSmartController
-
mousePressed
Deprecated.- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classALcdGXYSmartController
-
mouseReleased
Deprecated.- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in classALcdGXYSmartController
-
doPan
public void doPan(int aDeltaX, int aDeltaY) Deprecated.Performs a pan of (aDeltaX, aDeltaY) in AWT coordinate space. -
doPan
public void doPan(int aDeltaX, int aDeltaY, boolean aSaveInHistoryFlag) Deprecated. -
setAWTFilter
Deprecated.Sets the filter specifying to what mouse events the controller should respond to.- Parameters:
aAWTFilter
- the allowed mouse events (e.g. only MouseEvents with MouseEvent.BUTTON1)- See Also:
-
getAWTFilter
Deprecated.Returns the filter specifying to what mouse events the controller should respond to. The default filter is one responding only to the left mouse button.- Returns:
- a filter for the allowed mouse events (e.g. only for MouseEvent.BUTTON1), or null
-
getUndoLeft
public int getUndoLeft()Deprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support. -
getRedoLeft
public int getRedoLeft()Deprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support. -
resetUndoHistory
public void resetUndoHistory()Deprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support. -
undo
public void undo()Deprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support. -
redo
public void redo()Deprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for undo/redo support. -
addPropertyChangeListener
Deprecated. -
removePropertyChangeListener
Deprecated. -
setDragImageOnPan
public void setDragImageOnPan(boolean aDragImageOnPan) Deprecated.- Parameters:
aDragImageOnPan
- if true an image will be panned when dragging the mouse.
-
isDragImageOnPan
public boolean isDragImageOnPan()Deprecated.- See Also:
-
setDragFrameOnPan
public void setDragFrameOnPan(boolean aDragFrameOnPan) Deprecated.- Parameters:
aDragFrameOnPan
- if true aFrame
will be panned when dragging the mouse.
-
isDragFrameOnPan
public boolean isDragFrameOnPan()Deprecated.- See Also:
-
setDrawLineOnPan
public void setDrawLineOnPan(boolean aDrawLineOnPan) Deprecated.- Parameters:
aDrawLineOnPan
- if true a line between the location of the mouse pressed and the current mouse location will be painted when dragging the mouse.
-
isDragViewOnPan
public boolean isDragViewOnPan()Deprecated.Returns whether the view will be repainted while dragging the mouse.- Returns:
- true if the entire view will be dragged along with the mouse position.
- See Also:
-
setDragViewOnPan
public void setDragViewOnPan(boolean aDragViewOnPan) Deprecated.Enables live repainting of the entire view while panning. This may impact performance, in which case it is recommended to useasynchronously painted layers
.- Parameters:
aDragViewOnPan
- if true the entire view will be dragged along with the mouse position.- See Also:
-
isDrawLineOnPan
public boolean isDrawLineOnPan()Deprecated.- See Also:
-
setAutoRepaintView
public void setAutoRepaintView(boolean aAutoRepaintView) Deprecated.Sets whether or not the controller will explicitly request a view repaint after every pan operation.- Parameters:
aAutoRepaintView
- if true, the controller will repaint the view after every pan operation.
-
isAutoRepaintOnView
public boolean isAutoRepaintOnView()Deprecated.Returns whether or not the controller will explicitly request a view repaint after every pan operation.- See Also:
-
getNextGXYController
Deprecated.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
Deprecated.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
Deprecated.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.
-
handleAWTEvent
Deprecated.Description copied from interface:ILcdAWTEventListener
This is method is called when the target of the listener has a new AWTEvent available.- Specified by:
handleAWTEvent
in interfaceILcdAWTEventListener
- Parameters:
aEvent
- The event to be handled.
-
TLcdGXYNavigateController
has more intuitive navigation behavior