org.apache.batik.swing.gvt

Class AbstractPanInteractor

public abstract class AbstractPanInteractor extends InteractorAdapter

This class represents a pan interactor. To use it, just redefine the startInteraction method.
Field Summary
protected booleanfinished
Whether the interactor has finished.
protected CursorpreviousCursor
To store the previous cursor.
static CursorPAN_CURSOR
The cursor for panning.
protected intxCurrent
The mouse x current position.
protected intxStart
The mouse x start position.
protected intyCurrent
The mouse y current position.
protected intyStart
The mouse y start position.
Method Summary
booleanendInteraction()
Tells whether the interactor has finished.
voidmouseDragged(MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged.
voidmouseExited(MouseEvent e)
Invoked when the mouse exits a component.
voidmousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a component.
voidmouseReleased(MouseEvent e)
Invoked when a mouse button has been released on a component.

Field Detail

finished

protected boolean finished
Whether the interactor has finished.

previousCursor

protected Cursor previousCursor
To store the previous cursor.

PAN_CURSOR

public static final Cursor PAN_CURSOR
The cursor for panning.

xCurrent

protected int xCurrent
The mouse x current position.

xStart

protected int xStart
The mouse x start position.

yCurrent

protected int yCurrent
The mouse y current position.

yStart

protected int yStart
The mouse y start position.

Method Detail

endInteraction

public boolean endInteraction()
Tells whether the interactor has finished.

mouseDragged

public void mouseDragged(MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).

mouseExited

public void mouseExited(MouseEvent e)
Invoked when the mouse exits a component.

mousePressed

public void mousePressed(MouseEvent e)
Invoked when a mouse button has been pressed on a component.

mouseReleased

public void mouseReleased(MouseEvent e)
Invoked when a mouse button has been released on a component.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.