JGraph
v5.13.0.4


com.jgraph.navigation
Class PanningTool

java.lang.Object
  extended by org.jgraph.graph.BasicMarqueeHandler
      extended by com.jgraph.navigation.PanningTool

public class PanningTool
extends BasicMarqueeHandler

Tool that inserts vertices based on a prototype.


Field Summary
protected  int dx
           
protected  int dy
           
protected  int m_XDifference
           
protected  int m_YDifference
           
protected  java.awt.Cursor panningCursor
          The cursor to display when panning
 
Fields inherited from class org.jgraph.graph.BasicMarqueeHandler
currentPoint, marqueeBounds, previousCursor, startPoint
 
Constructor Summary
PanningTool()
           
 
Method Summary
 java.awt.Cursor getPanningCursor()
           
 boolean isForceMarqueeEvent(java.awt.event.MouseEvent e)
          The panning tool always has control if it is selected.
 void mouseDragged(java.awt.event.MouseEvent e)
          Includes the specified startPoint in the marquee selection.
 void mousePressed(java.awt.event.MouseEvent event)
          Sets the appropriate panning cursor and check how far the pan is
 void mouseReleased(java.awt.event.MouseEvent event)
          Ensures the cursor is set
protected  void processMouseDraggedEvent(java.awt.event.MouseEvent event)
          Overrides the parent's implementation to update the preview bounds to the current.
 void setPanningCursor(java.awt.Cursor panningCursor)
           
 
Methods inherited from class org.jgraph.graph.BasicMarqueeHandler
getCurrentPoint, getGraphForEvent, getMarqueeBounds, getPreviousCursor, getStartPoint, handleMarqueeEvent, isMarqueeTriggerEvent, mouseMoved, overlay, paint, setCurrentPoint, setMarqueeBounds, setPreviousCursor, setStartPoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_XDifference

protected int m_XDifference

m_YDifference

protected int m_YDifference

dx

protected int dx

dy

protected int dy

panningCursor

protected java.awt.Cursor panningCursor
The cursor to display when panning

Constructor Detail

PanningTool

public PanningTool()
Method Detail

isForceMarqueeEvent

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

Overrides:
isForceMarqueeEvent in class BasicMarqueeHandler

mousePressed

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

Overrides:
mousePressed in class BasicMarqueeHandler
Parameters:
event - The object that describes the event.

processMouseDraggedEvent

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

Overrides:
processMouseDraggedEvent in class BasicMarqueeHandler
Parameters:
event - The object that describes the event.

mouseDragged

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

Overrides:
mouseDragged in class BasicMarqueeHandler

mouseReleased

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

Overrides:
mouseReleased in class BasicMarqueeHandler
Parameters:
event - The object that describes the event.

getPanningCursor

public java.awt.Cursor getPanningCursor()
Returns:
the panningCursor

setPanningCursor

public void setPanningCursor(java.awt.Cursor panningCursor)
Parameters:
panningCursor - the panningCursor to set

JGraph
v5.13.0.4


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