|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.piccolox.swing.PDefaultScrollDirector
edu.umd.cs.piccolo.examples.PrintExample.DocumentScrollDirector
public class PrintExample.DocumentScrollDirector
A modified scroll director that performs document based scroling rather than window based scrolling (ie. the scrollbars act in the inverse direction as normal)
Field Summary |
---|
Fields inherited from class edu.umd.cs.piccolox.swing.PDefaultScrollDirector |
---|
camera, root, scrollInProgress, scrollPane, view, viewPort |
Constructor Summary | |
---|---|
PrintExample.DocumentScrollDirector()
|
Method Summary | |
---|---|
java.awt.Point |
getViewPosition(java.awt.geom.Rectangle2D viewBounds)
Get the View position given the specified camera bounds - modified such that: Rather than finding the distance from the upper left corner of the window to the upper left corner of the document - we instead find the distance from the lower right corner of the window to the upper left corner of the document THEN we subtract that value from total document width so that the position is inverted |
void |
setViewPosition(double x,
double y)
We do the same thing we did in getViewPosition above to flip the document-window position relationship |
Methods inherited from class edu.umd.cs.piccolox.swing.PDefaultScrollDirector |
---|
getViewSize, install, propertyChange, shouldRevalidateScrollPane, unInstall |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrintExample.DocumentScrollDirector()
Method Detail |
---|
public java.awt.Point getViewPosition(java.awt.geom.Rectangle2D viewBounds)
getViewPosition
in interface PScrollDirector
getViewPosition
in class PDefaultScrollDirector
viewBounds
- The bounds for which the view position will be
computed
public void setViewPosition(double x, double y)
setViewPosition
in interface PScrollDirector
setViewPosition
in class PDefaultScrollDirector
x
- The new x positiony
- The new y position
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |