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
ConstructorsConstructorDescriptionDeprecated.Creates a pan controller that responds to the left mouse button.TLcdGXYPanController(boolean aRegisterInstance) Deprecated.use the constructor without parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyChangeListener(PropertyChangeListener aPropertyChangeListener) Deprecated.voidDeprecated.This method will append the passed controller to the end of the chain.voiddoPan(int aDeltaX, int aDeltaY) Deprecated.Performs a pan of (aDeltaX, aDeltaY) in AWT coordinate space.voiddoPan(int aDeltaX, int aDeltaY, boolean aSaveInHistoryFlag) Deprecated.protected voidDeprecated.Invoked by the paint() method.Deprecated.Returns the filter specifying to what mouse events the controller should respond to.Deprecated.intDeprecated.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.intDeprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)for undo/redo support.intDeprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)for undo/redo support.voidhandleAWTEvent(AWTEvent aEvent) Deprecated.This is method is called when the target of the listener has a new AWTEvent available.booleanDeprecated.Returns whether or not the controller will explicitly request a view repaint after every pan operation.booleanDeprecated.booleanDeprecated.booleanDeprecated.Returns whether the view will be repainted while dragging the mouse.booleanDeprecated.voidDeprecated.voidDeprecated.voidmouseMoved(MouseEvent me) Deprecated.voidDeprecated.voidDeprecated.voidDeprecated.Enables the controller to give visual feedback on the current user interactions.voidredo()Deprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)for undo/redo support.voidremovePropertyChangeListener(PropertyChangeListener aPropertyChangeListener) Deprecated.voidDeprecated.UseALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)for undo/redo support.voidsetAutoRepaintView(boolean aAutoRepaintView) Deprecated.Sets whether or not the controller will explicitly request a view repaint after every pan operation.voidsetAWTFilter(ILcdFilter<AWTEvent> aAWTFilter) Deprecated.Sets the filter specifying to what mouse events the controller should respond to.voidDeprecated.Set the cursor to be used when the mouse is up, or null to reuse the previously configured cursor.voidsetDragFrameOnPan(boolean aDragFrameOnPan) Deprecated.voidsetDragImageOnPan(boolean aDragImageOnPan) Deprecated.voidsetDragViewOnPan(boolean aDragViewOnPan) Deprecated.Enables live repainting of the entire view while panning.voidsetDrawLineOnPan(boolean aDrawLineOnPan) Deprecated.voidsetGhostColor(Color aGhostColor) Deprecated.voidsetGhostLineWidth(int aGhostLineWidth) Deprecated.voidsetMouseDownCursor(Cursor aMouseDownCursor) Deprecated.Set the cursor to be used when the mouse is down.voidDeprecated.This method sets the next controller in the chain for this controller.voidstartInteraction(ILcdGXYView aGXYView) Deprecated.Sets up the controller to receive input through the view passed.voidterminateInteraction(ILcdGXYView aGXYView) Deprecated.Releases a few items.voidundo()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, updateViewLocationAfterZoomSFCTMethods 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, viewRepaintMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.luciad.view.gxy.ILcdGXYController
getCursor, getIcon, getLayered, getName, getShortDescription, viewRepaintMethods inherited from interface com.luciad.gui.ILcdUndoableSource
addUndoableListener, removeUndoableListenerMethods 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:
setCursorin 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:ALcdGXYControllerSets 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.- Specified by:
startInteractionin interfaceILcdGXYController- Overrides:
startInteractionin classALcdGXYSmartController- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerwill interact with.- See Also:
-
terminateInteraction
Deprecated.Description copied from class:ALcdGXYControllerReleases a few items. Can be redefined but this 'super' method should be called too.- Specified by:
terminateInteractionin interfaceILcdGXYController- Overrides:
terminateInteractionin classALcdGXYSmartController- Parameters:
aGXYView- theILcdGXYViewthisILcdGXYControllerinteracted with.- See Also:
-
mouseMoved
Deprecated.- Specified by:
mouseMovedin interfaceMouseMotionListener- Overrides:
mouseMovedin classALcdGXYSmartController
-
paint
Deprecated.Description copied from class:ALcdGXYControllerEnables 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:
paintin interfaceILcdGXYController- Overrides:
paintin classALcdGXYController- Parameters:
aGraphics- the Graphics on which the view was rendered.
-
mouseDragged
Deprecated.- Specified by:
mouseDraggedin interfaceMouseMotionListener- Overrides:
mouseDraggedin 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:
mouseClickedin interfaceMouseListener- Overrides:
mouseClickedin classALcdGXYSmartController
-
mousePressed
Deprecated.- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classALcdGXYSmartController
-
mouseReleased
Deprecated.- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin 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 aFramewill 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: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
Deprecated.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
Deprecated.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.
-
handleAWTEvent
Deprecated.Description copied from interface:ILcdAWTEventListenerThis is method is called when the target of the listener has a new AWTEvent available.- Specified by:
handleAWTEventin interfaceILcdAWTEventListener- Parameters:
aEvent- The event to be handled.
-
TLcdGXYNavigateControllerhas more intuitive navigation behavior