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

## com.vistech.imageviewer
Class Scroll

    java.lang.Object
      |
      +--com.vistech.imageviewer.Scroll

All Implemented Interfaces:
  ScrollController, java.io.Serializable

public class Scroll
extends java.lang.Object
implements ScrollController, java.io.Serializable

Scrolls an image displayed on a canvas. The canvas object must implement the ImageManipulator interface.

Version:
  1.0 1 Nov 1999
Author:
  Lawrence Rodrigues
See Also:
  Serialized Form

Field Summary
`protected java.awt.geom.AffineTransform` | `atx`
`protected ImageManipulator` | `imageCanvas`
`protected java.awt.Point` | `panOffset`

Constructor Summary
`Scroll()`
`Scroll(ImageManipulator imageCanvas)`

Method Summary
`java.awt.Point` | `getPanOffset()` Returns the panOffset property.
`void` | `reset()`
`void` | `resetAndTranslate(int dx, int dy)`
`void` | `scroll(int x, int y)` Scrolls the image.
`void` | `setImageManipulator(ImageManipulator imageCanvas)`
`void` | `setPanOffset(java.awt.Point panOffset)` Gets the panOffset property.
`void` | `startScroll(int x, int y)` Starts the scroll and sets the anchor point.
`void` | `stopScroll()` Stops scroll.
`void` | `translate(double diffx, double diffy)`
`void` | `translateIncr(double incrx, double incry)`

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

Field Detail

### atx

    protected java.awt.geom.AffineTransform atx

### panOffset

    protected java.awt.Point panOffset

### imageCanvas

    protected ImageManipulator imageCanvas

Constructor Detail

### Scroll

    public Scroll()

### Scroll

    public Scroll(ImageManipulator imageCanvas)

  Parameters:
    `imagecanvas` - the component on which the image is drawn.

Method Detail

### setImageManipulator

    public void setImageManipulator(ImageManipulator imageCanvas)

  Parameters:
    `imagecanvas` - the component on which the image is drawn.

### setPanOffset

    public void setPanOffset(java.awt.Point panOffset)

  Description copied from interface: `ScrollController`
  Gets the panOffset property.
  Specified by:
    `setPanOffset` in interface `ScrollController`
  Following copied from interface: `com.vistech.imageviewer.ScrollController`
  Parameters:
    `panOffset` - the offset by which the currently displayed image is moved from the previous position.

### getPanOffset

    public java.awt.Point getPanOffset()

  Description copied from interface: `ScrollController`
  Returns the panOffset property.
  Specified by:
    `getPanOffset` in interface `ScrollController`
  Following copied from interface: `com.vistech.imageviewer.ScrollController`
  Returns:
    the panOffset.

### translateIncr

    public void translateIncr(double incrx,
                              double incry)

### translate

    public void translate(double diffx,
                          double diffy)

### resetAndTranslate

    public void resetAndTranslate(int dx,
                                  int dy)

### scroll

    public void scroll(int x,
                       int y)

  Description copied from interface: `ScrollController`
  Scrolls the image.
  Specified by:
    `scroll` in interface `ScrollController`
  Following copied from interface: `com.vistech.imageviewer.ScrollController`
  Parameters:
    `x` - the x coordinate of the current position.
    `y` - the y coordinate of the current position.

### startScroll

    public void startScroll(int x,
                            int y)

  Description copied from interface: `ScrollController`
  Starts the scroll and sets the anchor point.
  Specified by:
    `startScroll` in interface `ScrollController`
  Following copied from interface: `com.vistech.imageviewer.ScrollController`
  Parameters:
    `x` - the x coordinate of the scroll anchor.
    `y` - the y coordinate of the scroll anchor.

### stopScroll

    public void stopScroll()

  Description copied from interface: `ScrollController`
  Stops scroll.
  Specified by:
    `stopScroll` in interface `ScrollController`

### reset

    public void reset()

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