com.vistech.imageviewer
Class Scroll
java.lang.Object
|
+--com.vistech.imageviewer.Scroll
- All Implemented Interfaces:
- ScrollController
- public class Scroll
- extends java.lang.Object
- implements ScrollController
Scrolls an image displayed on a canvas.
The canvas object must implement the ImageManipulator interface.
- Version:
- 1.0 1 Nov 1999
- Author:
- Lawrence Rodrigues
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
atx
protected java.awt.geom.AffineTransform atx
panOffset
protected java.awt.Point panOffset
imageCanvas
protected ImageManipulator imageCanvas
Scroll
public Scroll()
Scroll
public Scroll(ImageManipulator imageCanvas)
- Parameters:
imagecanvas
- the component on which the image is drawn.
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()