edu.umd.cs.jazz.util
Interface ZScrollDirector

All Known Implementing Classes:
ZDefaultScrollDirector

public interface ZScrollDirector

The interface an application can implement to control scrolling in a ZScrollPane->ZViewport->ZCanvas component hierarchy.

Author:
Lance Good
See Also:
ZDefaultScrollDirector

Method Summary
 java.awt.Point getViewPosition(java.awt.geom.Rectangle2D r)
          Get the View position given the specified camera bounds
 java.awt.Dimension getViewSize(java.awt.geom.Rectangle2D r)
          Get the size of the view based on the specified camera bounds
 void install(ZViewport viewport, ZCanvas view)
          Installs the scroll director
 void setViewPosition(double x, double y)
          Set the view position
 void unInstall()
          Uninstall the scroll director
 

Method Detail

install

public void install(ZViewport viewport,
                    ZCanvas view)
Installs the scroll director

Parameters:
view - The ZCanvas that the viewport looks at

unInstall

public void unInstall()
Uninstall the scroll director


getViewPosition

public java.awt.Point getViewPosition(java.awt.geom.Rectangle2D r)
Get the View position given the specified camera bounds

Returns:
The view position

setViewPosition

public void setViewPosition(double x,
                            double y)
Set the view position

Parameters:
x - The new x position
y - The new y position

getViewSize

public java.awt.Dimension getViewSize(java.awt.geom.Rectangle2D r)
Get the size of the view based on the specified camera bounds

Returns:
The view size


Copyright 2003 by University of Maryland, College Park, MD 20742, USA All rights reserved.