Class PanningTool
java.lang.Object
org.jgraph.graph.BasicMarqueeHandler
com.jgraph.navigation.PanningTool
Tool that inserts vertices based on a prototype.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected intprotected intprotected CursorThe cursor to display when panningFields inherited from class BasicMarqueeHandler
currentPoint, marqueeBounds, previousCursor, startPoint -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe panning tool always has control if it is selected.voidIncludes the specified startPoint in the marquee selection.voidmousePressed(MouseEvent event) Sets the appropriate panning cursor and check how far the pan isvoidmouseReleased(MouseEvent event) Ensures the cursor is setprotected voidOverrides the parent's implementation to update the preview bounds to the current.voidsetPanningCursor(Cursor panningCursor) Methods inherited from class BasicMarqueeHandler
getCurrentPoint, getGraphForEvent, getMarqueeBounds, getPreviousCursor, getStartPoint, handleMarqueeEvent, isMarqueeTriggerEvent, mouseMoved, overlay, paint, setCurrentPoint, setMarqueeBounds, setPreviousCursor, setStartPoint
-
Field Details
-
m_XDifference
protected int m_XDifference -
m_YDifference
protected int m_YDifference -
dx
protected int dx -
dy
protected int dy -
panningCursor
The cursor to display when panning
-
-
Constructor Details
-
PanningTool
public PanningTool()
-
-
Method Details
-
isForceMarqueeEvent
The panning tool always has control if it is selected.- Overrides:
isForceMarqueeEventin classBasicMarqueeHandler
-
mousePressed
Sets the appropriate panning cursor and check how far the pan is- Overrides:
mousePressedin classBasicMarqueeHandler- Parameters:
event- The object that describes the event.
-
processMouseDraggedEvent
Overrides the parent's implementation to update the preview bounds to the current.- Overrides:
processMouseDraggedEventin classBasicMarqueeHandler- Parameters:
event- The object that describes the event.
-
mouseDragged
Includes the specified startPoint in the marquee selection. Calls overlay.- Overrides:
mouseDraggedin classBasicMarqueeHandler
-
mouseReleased
Ensures the cursor is set- Overrides:
mouseReleasedin classBasicMarqueeHandler- Parameters:
event- The object that describes the event.
-
getPanningCursor
- Returns:
- the panningCursor
-
setPanningCursor
- Parameters:
panningCursor- the panningCursor to set
-