|
Side of Software Print Preview Library 1.8.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--sos.preview.DefaultZoomFunction
A default implementation of ZoomFunction that has a constant
zoom "jump," a minimum zoom, and a maximum zoom.
| Constructor Summary | |
DefaultZoomFunction()
Creates a DefaultZoomFunction with a jump of 0.25, minimum scale of
0.01, and maximum scale of Double.MAX_VALUE. |
|
DefaultZoomFunction(double jump)
Creates a DefaultZoomFunction with the specified jump, a minimum scale of
0.01, and a maximum scale of Double.MAX_VALUE. |
|
DefaultZoomFunction(double jump,
double minimumScale)
Creates a DefaultZoomFunction with the specified jump, the specified
minimum scale, and a maximum scale of Double.MAX_VALUE. |
|
DefaultZoomFunction(double jump,
double minimumScale,
double maximumScale)
Creates a DefaultZoomFunction with the specified jump,
minimum scale, and maximum scale. |
|
| Method Summary | |
double |
zoomIn(double scale)
Returns the next zoom-in scale, given the current scale. |
double |
zoomOut(double scale)
Returns the next zoom-out scale, given the current scale. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultZoomFunction()
DefaultZoomFunction with a jump of 0.25, minimum scale of
0.01, and maximum scale of Double.MAX_VALUE.
public DefaultZoomFunction(double jump)
throws java.lang.IllegalArgumentException
DefaultZoomFunction with the specified jump, a minimum scale of
0.01, and a maximum scale of Double.MAX_VALUE.
jump - percentage to adjust the scale when zooming in and out
java.lang.IllegalArgumentException - if jump is negative
public DefaultZoomFunction(double jump,
double minimumScale)
throws java.lang.IllegalArgumentException
DefaultZoomFunction with the specified jump, the specified
minimum scale, and a maximum scale of Double.MAX_VALUE.
jump - percentage to adjust the scale when zooming in and outminimumScale - mimumum allowable zoom-out scale
java.lang.IllegalArgumentException - if either parameter is negative
public DefaultZoomFunction(double jump,
double minimumScale,
double maximumScale)
throws java.lang.IllegalArgumentException
DefaultZoomFunction with the specified jump,
minimum scale, and maximum scale.
jump - percentage to adjust the scale when zooming in and outminimumScale - mimumum allowable zoom-out scalemaximumScale - maximum allowable zoom-in scale
java.lang.IllegalArgumentException - if any parameter is negative or
if maximumScale < minimumScale| Method Detail |
public double zoomIn(double scale)
ZoomFunction
zoomIn in interface ZoomFunctionscale - the current scale
scale, if zooming is not allowedpublic double zoomOut(double scale)
ZoomFunction
zoomOut in interface ZoomFunctionscale - the current scale
scale, if zooming is not allowed
|
Side of Software Print Preview Library 1.8.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||