com.jgraph.navigation

Class GraphNavigator.NavigatorPane

public class GraphNavigator.NavigatorPane extends JScrollPane implements MouseListener, MouseMotionListener

Scrollpane that implements special painting used for the navigator preview.
Field Summary
protected RectanglecurrentViewport
Holds the bounds of the finder (red box).
protected PointlastPoint
Holds the location of the last mouse event.
Constructor Summary
NavigatorPane(JGraph backingGraph)
Constructs a new navigator pane using the specified backing graph to display the preview.
Method Summary
voidmouseClicked(MouseEvent e)
voidmouseDragged(MouseEvent e)
voidmouseEntered(MouseEvent e)
voidmouseExited(MouseEvent e)
voidmouseMoved(MouseEvent e)
voidmousePressed(MouseEvent e)
voidmouseReleased(MouseEvent e)
voidpaint(Graphics g)
Paints the navigator pane on the specified graphics.

Field Detail

currentViewport

protected Rectangle currentViewport
Holds the bounds of the finder (red box).

lastPoint

protected Point lastPoint
Holds the location of the last mouse event.

Constructor Detail

NavigatorPane

public NavigatorPane(JGraph backingGraph)
Constructs a new navigator pane using the specified backing graph to display the preview.

Parameters: backingGraph The backing graph to use for rendering.

Method Detail

mouseClicked

public void mouseClicked(MouseEvent e)

mouseDragged

public void mouseDragged(MouseEvent e)

mouseEntered

public void mouseEntered(MouseEvent e)

mouseExited

public void mouseExited(MouseEvent e)

mouseMoved

public void mouseMoved(MouseEvent e)

mousePressed

public void mousePressed(MouseEvent e)

mouseReleased

public void mouseReleased(MouseEvent e)

paint

public void paint(Graphics g)
Paints the navigator pane on the specified graphics.

Parameters: g The graphics to paint the navigator to.

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