TLcdGXYNavigateController
has more intuitive navigation behavior@Deprecated public class TLcdGXYPanController extends ALcdGXYSmartController implements MouseListener, MouseMotionListener, ILcdUndoableSource, ILcdGXYChainableController
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)
.Constructor and Description |
---|
TLcdGXYPanController()
Deprecated.
Creates a pan controller that responds to the left mouse button.
|
TLcdGXYPanController(boolean aRegisterInstance)
Deprecated.
use the constructor without parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
Deprecated.
|
void |
appendGXYController(ILcdGXYChainableController aEnd)
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 |
drawGhost(Graphics aGraphics,
int aXPressed,
int aYPressed,
int aXMouse,
int aYMouse)
Deprecated.
Invoked by the paint() method.
|
ILcdFilter<AWTEvent> |
getAWTFilter()
Deprecated.
Returns the filter specifying to what mouse events the controller should respond to.
|
Color |
getGhostColor()
Deprecated.
|
int |
getGhostLineWidth()
Deprecated.
|
ILcdGXYChainableController |
getNextGXYController()
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 |
getRedoLeft()
Deprecated.
Use
ALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener) for
undo/redo support. |
int |
getUndoLeft()
Deprecated.
Use
ALcdGXYSmartController.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 |
isAutoRepaintOnView()
Deprecated.
Returns whether or not the controller will explicitly request a view repaint after every pan operation.
|
boolean |
isDragFrameOnPan()
Deprecated.
|
boolean |
isDragImageOnPan()
Deprecated.
|
boolean |
isDragViewOnPan()
Deprecated.
Returns whether the view will be repainted while dragging the mouse.
|
boolean |
isDrawLineOnPan()
Deprecated.
|
void |
mouseClicked(MouseEvent me)
Deprecated.
|
void |
mouseDragged(MouseEvent me)
Deprecated.
|
void |
mouseMoved(MouseEvent me)
Deprecated.
|
void |
mousePressed(MouseEvent me)
Deprecated.
|
void |
mouseReleased(MouseEvent me)
Deprecated.
|
void |
paint(Graphics aGraphics)
Deprecated.
Enables the controller to give visual feedback on the current user interactions.
|
void |
redo()
Deprecated.
Use
ALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener) for
undo/redo support. |
void |
removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
Deprecated.
|
void |
resetUndoHistory()
Deprecated.
Use
ALcdGXYSmartController.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 |
setCursor(Cursor aCursor)
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 |
setNextGXYController(ILcdGXYChainableController aNext)
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.
Use
ALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener) for
undo/redo support. |
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
addStatusListener, asGXYController, fireStatusEvent, getCursor, getGXYView, getIcon, getName, getShortDescription, registerInstance, removeStatusListener, retrieveGXYViewXYWorldTransformation, setClassTraceOn, setGXYView, setIcon, setName, setShortDescription, viewRepaint
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
mouseEntered, mouseExited
addUndoableListener, removeUndoableListener
getCursor, getIcon, getLayered, getName, getShortDescription, viewRepaint
public TLcdGXYPanController()
ILcdGXYView.setGXYController(com.luciad.view.gxy.ILcdGXYController)
.public TLcdGXYPanController(boolean aRegisterInstance)
public void setCursor(Cursor aCursor)
setCursor
in class ALcdGXYController
aCursor
- the Cursor.public void setMouseDownCursor(Cursor aMouseDownCursor)
aMouseDownCursor
- the Cursor.public void setGhostLineWidth(int aGhostLineWidth)
aGhostLineWidth
- the Line width of the dragged rectangle.public int getGhostLineWidth()
setGhostLineWidth(int)
public void setGhostColor(Color aGhostColor)
aGhostColor
- the Color of the dragged rectanglepublic Color getGhostColor()
public void startInteraction(ILcdGXYView aGXYView)
ALcdGXYController
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
.
startInteraction
in interface ILcdGXYController
startInteraction
in class ALcdGXYSmartController
aGXYView
- the ILcdGXYView
this ILcdGXYController
will interact with.ILcdGXYView.setGXYController(com.luciad.view.gxy.ILcdGXYController)
,
ILcdGXYController.terminateInteraction(com.luciad.view.gxy.ILcdGXYView)
public void terminateInteraction(ILcdGXYView aGXYView)
ALcdGXYController
terminateInteraction
in interface ILcdGXYController
terminateInteraction
in class ALcdGXYSmartController
aGXYView
- the ILcdGXYView
this ILcdGXYController
interacted with.ILcdGXYView.setGXYController(com.luciad.view.gxy.ILcdGXYController)
,
ILcdGXYController.startInteraction(com.luciad.view.gxy.ILcdGXYView)
public void mouseMoved(MouseEvent me)
mouseMoved
in interface MouseMotionListener
mouseMoved
in class ALcdGXYSmartController
public void paint(Graphics aGraphics)
ALcdGXYController
Empty implementation. Redefine this method to render on the Graphics on which the view is rendered.
paint
in interface ILcdGXYController
paint
in class ALcdGXYController
aGraphics
- the Graphics on which the view was rendered.public void mouseDragged(MouseEvent me)
mouseDragged
in interface MouseMotionListener
mouseDragged
in class ALcdGXYSmartController
protected void drawGhost(Graphics aGraphics, int aXPressed, int aYPressed, int aXMouse, int aYMouse)
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 cursorpublic void mouseClicked(MouseEvent me)
mouseClicked
in interface MouseListener
mouseClicked
in class ALcdGXYSmartController
public void mousePressed(MouseEvent me)
mousePressed
in interface MouseListener
mousePressed
in class ALcdGXYSmartController
public void mouseReleased(MouseEvent me)
mouseReleased
in interface MouseListener
mouseReleased
in class ALcdGXYSmartController
public void doPan(int aDeltaX, int aDeltaY)
public void doPan(int aDeltaX, int aDeltaY, boolean aSaveInHistoryFlag)
public void setAWTFilter(ILcdFilter<AWTEvent> aAWTFilter)
aAWTFilter
- the allowed mouse events (e.g. only MouseEvents with MouseEvent.BUTTON1)TLcdAWTEventFilterBuilder
public ILcdFilter<AWTEvent> getAWTFilter()
public int getUndoLeft()
ALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for
undo/redo support.public int getRedoLeft()
ALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for
undo/redo support.public void resetUndoHistory()
ALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for
undo/redo support.public void undo()
ALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for
undo/redo support.public void redo()
ALcdGXYSmartController.addUndoableListener(com.luciad.gui.ILcdUndoableListener)
for
undo/redo support.public void addPropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
public void removePropertyChangeListener(PropertyChangeListener aPropertyChangeListener)
public void setDragImageOnPan(boolean aDragImageOnPan)
aDragImageOnPan
- if true an image will be panned when dragging the
mouse.public boolean isDragImageOnPan()
setDragImageOnPan(boolean)
public void setDragFrameOnPan(boolean aDragFrameOnPan)
aDragFrameOnPan
- if true a Frame
will be panned when dragging the
mouse.public boolean isDragFrameOnPan()
setDragFrameOnPan(boolean)
public void setDrawLineOnPan(boolean aDrawLineOnPan)
aDrawLineOnPan
- if true a line between the location of the mouse
pressed and the current mouse location will be painted when dragging the
mouse.public boolean isDragViewOnPan()
isDragViewOnPan()
public void setDragViewOnPan(boolean aDragViewOnPan)
asynchronously painted layers
.aDragViewOnPan
- if true the entire view will be dragged along with the mouse position.isDragViewOnPan()
public boolean isDrawLineOnPan()
setDrawLineOnPan(boolean)
public void setAutoRepaintView(boolean aAutoRepaintView)
aAutoRepaintView
- if true, the controller will repaint the view after every pan operation.public boolean isAutoRepaintOnView()
setAutoRepaintView(boolean)
public ILcdGXYChainableController getNextGXYController()
ILcdGXYChainableController
getNextGXYController
in interface ILcdGXYChainableController
ILcdGXYChainableController.setNextGXYController(ILcdGXYChainableController)
public void setNextGXYController(ILcdGXYChainableController aNext)
ILcdGXYChainableController
setNextGXYController
in interface ILcdGXYChainableController
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
aEnd
- the controller to be appended to the end of the chain.public void handleAWTEvent(AWTEvent aEvent)
ILcdAWTEventListener
handleAWTEvent
in interface ILcdAWTEventListener
aEvent
- The event to be handled.