edu.umd.cs.piccolox.swing
Interface PScrollDirector

All Known Implementing Classes:
PDefaultScrollDirector

public interface PScrollDirector

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

Author:
Lance Good
See Also:
PDefaultScrollDirector

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

Method Detail

install

void install(PViewport viewport,
             PCanvas view)
Installs the scroll director

Parameters:
viewport - The viewport on which this director directs
view - The ZCanvas that the viewport looks at

unInstall

void unInstall()
Uninstall the scroll director


getViewPosition

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

Parameters:
viewBounds - The bounds for which the view position will be computed
Returns:
The view position

setViewPosition

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

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

getViewSize

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

Parameters:
viewBounds - The view bounds for which the view size will be computed
Returns:
The view size


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