|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--edu.umd.cs.jazz.util.ZDefaultScrollDirector
The default implementation of the scroll director that follows the widely accepted model of scrolling - namely the scrollbars control the movement of the window over the document rather than the movement of the document under the window.
| Field Summary | |
protected ZCamera |
camera
The canvas' camera |
protected ZRoot |
root
The canvas' root |
protected boolean |
scrollInProgress
Flag to indicate when scrolling is currently in progress |
protected ZScrollPane |
scrollPane
The scrollpane that contains the viewport |
protected ZCanvas |
view
The canvas that this class directs |
protected ZViewport |
viewPort
The viewport that signals this scroll director |
| Constructor Summary | |
ZDefaultScrollDirector()
The default constructor |
|
| Method Summary | |
void |
boundsChanged(ZNodeEvent e)
Invoked when a node has its bounds changed. |
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 |
globalBoundsChanged(ZNodeEvent e)
Invoked when a node has its global bounds changed. |
void |
install(ZViewport viewPort,
ZCanvas view)
Installs the scroll director and adds the appropriate listeners |
void |
setViewPosition(double x,
double y)
Set the view position in a manner consistent with standardized scrolling |
boolean |
shouldRevalidateScrollPane()
Should the ScrollPane be revalidated? - This occurs when either the scrollbars are showing and should be remove or are note showing and should be added |
void |
unInstall()
Uninstall the scroll director from the viewport |
void |
viewChanged(ZCameraEvent e)
Invoked when the camera's view transform changes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ZViewport viewPort
protected ZScrollPane scrollPane
protected ZCanvas view
protected ZCamera camera
protected ZRoot root
protected boolean scrollInProgress
| Constructor Detail |
public ZDefaultScrollDirector()
| Method Detail |
public void install(ZViewport viewPort,
ZCanvas view)
install in interface ZScrollDirectorviewPort - The viewport on which this director directsview - The ZCanvas that the viewport looks atpublic void unInstall()
unInstall in interface ZScrollDirectorpublic java.awt.Point getViewPosition(java.awt.geom.Rectangle2D viewBounds)
getViewPosition in interface ZScrollDirectorviewBounds - The bounds for which the view position will be computed
public java.awt.Dimension getViewSize(java.awt.geom.Rectangle2D viewBounds)
getViewSize in interface ZScrollDirectorviewBounds - The view bounds for which the view size will be computed
public void setViewPosition(double x,
double y)
setViewPosition in interface ZScrollDirectorx - The new x positiony - The new y positionpublic void viewChanged(ZCameraEvent e)
viewChanged in interface ZCameraListenere - The view changed camera eventpublic void boundsChanged(ZNodeEvent e)
boundsChanged in interface ZNodeListenere - The bounds changed eventpublic void globalBoundsChanged(ZNodeEvent e)
globalBoundsChanged in interface ZNodeListenere - The ignored global bounds eventpublic boolean shouldRevalidateScrollPane()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||