Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.batik.swing.gvt
Class AbstractPanInteractor

    java.lang.Object
      org.apache.batik.swing.gvt.InteractorAdapter
          org.apache.batik.swing.gvt.AbstractPanInteractor

All Implemented Interfaces:
  KeyListener, MouseListener, MouseMotionListener, EventListener, Interactor

    public abstract class AbstractPanInteractor

extends InteractorAdapter

This class represents a pan interactor. To use it, just redefine the `InteractorAdapter.startInteraction(InputEvent)` method.

Field Summary
`protected boolean` | `finished` Whether the interactor has finished.
`static Cursor` | `PAN_CURSOR` The cursor for panning.
`protected Cursor` | `previousCursor` To store the previous cursor.
`protected int` | `xCurrent` The mouse x current position.
`protected int` | `xStart` The mouse x start position.
`protected int` | `yCurrent` The mouse y current position.
`protected int` | `yStart` The mouse y start position.

Constructor Summary
`AbstractPanInteractor()`

Method Summary
`boolean` | `endInteraction()` Tells whether the interactor has finished.
`void` | `mouseDragged(MouseEvent e)` Invoked when a mouse button is pressed on a component and then dragged.
`void` | `mouseExited(MouseEvent e)` Invoked when the mouse exits a component.
`void` | `mousePressed(MouseEvent e)` Invoked when a mouse button has been pressed on a component.
`void` | `mouseReleased(MouseEvent e)` Invoked when a mouse button has been released on a component.

Methods inherited from class org.apache.batik.swing.gvt.InteractorAdapter
`keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseMoved, startInteraction`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PAN_CURSOR

    public static final Cursor PAN_CURSOR

  The cursor for panning.

### finished

    protected boolean finished

  Whether the interactor has finished.

### xStart

    protected int xStart

  The mouse x start position.

### yStart

    protected int yStart

  The mouse y start position.

### xCurrent

    protected int xCurrent

  The mouse x current position.

### yCurrent

    protected int yCurrent

  The mouse y current position.

### previousCursor

    protected Cursor previousCursor

  To store the previous cursor.

Constructor Detail

### AbstractPanInteractor

    public AbstractPanInteractor()

Method Detail

### endInteraction

    public boolean endInteraction()

  Tells whether the interactor has finished.

  Specified by:
    `endInteraction` in interface `Interactor`
  Overrides:
    `endInteraction` in class `InteractorAdapter`

### mousePressed

    public void mousePressed(MouseEvent e)

  Invoked when a mouse button has been pressed on a component.

  Specified by:
    `mousePressed` in interface `MouseListener`
  Overrides:
    `mousePressed` in class `InteractorAdapter`

### mouseReleased

    public void mouseReleased(MouseEvent e)

  Invoked when a mouse button has been released on a component.

  Specified by:
    `mouseReleased` in interface `MouseListener`
  Overrides:
    `mouseReleased` in class `InteractorAdapter`

### mouseExited

    public void mouseExited(MouseEvent e)

  Invoked when the mouse exits a component.

  Specified by:
    `mouseExited` in interface `MouseListener`
  Overrides:
    `mouseExited` in class `InteractorAdapter`

### 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).

  Specified by:
    `mouseDragged` in interface `MouseMotionListener`
  Overrides:
    `mouseDragged` in class `InteractorAdapter`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Apache Software Foundation. All Rights Reserved.