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
 Point getViewPosition(Rectangle2D viewBounds)
          Get the View position given the specified camera bounds.
 Dimension getViewSize(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

Point getViewPosition(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

Dimension getViewSize(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 © 1995-2010 Piccolo2D. All Rights Reserved.