com.jgraph.navigation

Class PanningTool

public class PanningTool extends BasicMarqueeHandler

Tool that inserts vertices based on a prototype.
Field Summary
protected intdx
protected intdy
protected intm_XDifference
protected intm_YDifference
protected CursorpanningCursor
The cursor to display when panning
Method Summary
CursorgetPanningCursor()
booleanisForceMarqueeEvent(MouseEvent e)
The panning tool always has control if it is selected.
voidmouseDragged(MouseEvent e)
Includes the specified startPoint in the marquee selection.
voidmousePressed(MouseEvent event)
Sets the appropriate panning cursor and check how far the pan is
voidmouseReleased(MouseEvent event)
Ensures the cursor is set
protected voidprocessMouseDraggedEvent(MouseEvent event)
Overrides the parent's implementation to update the preview bounds to the current.
voidsetPanningCursor(Cursor panningCursor)

Field Detail

dx

protected int dx

dy

protected int dy

m_XDifference

protected int m_XDifference

m_YDifference

protected int m_YDifference

panningCursor

protected Cursor panningCursor
The cursor to display when panning

Method Detail

getPanningCursor

public Cursor getPanningCursor()

Returns: the panningCursor

isForceMarqueeEvent

public boolean isForceMarqueeEvent(MouseEvent e)
The panning tool always has control if it is selected.

mouseDragged

public void mouseDragged(MouseEvent e)
Includes the specified startPoint in the marquee selection. Calls overlay.

mousePressed

public void mousePressed(MouseEvent event)
Sets the appropriate panning cursor and check how far the pan is

Parameters: event The object that describes the event.

mouseReleased

public void mouseReleased(MouseEvent event)
Ensures the cursor is set

Parameters: event The object that describes the event.

processMouseDraggedEvent

protected void processMouseDraggedEvent(MouseEvent event)
Overrides the parent's implementation to update the preview bounds to the current.

Parameters: event The object that describes the event.

setPanningCursor

public void setPanningCursor(Cursor panningCursor)

Parameters: panningCursor the panningCursor to set

Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.