public final class ZoomMenu extends MenuBase
Modifier and Type | Class and Description |
---|---|
private static class |
ZoomMenu.ZoomMenuItem |
Modifier and Type | Field and Description |
---|---|
private float |
imageZoomScale |
private static ZoomMenu |
instance |
private javax.swing.JMenu |
menu |
private float |
pageZoomScale |
private static int[] |
ZOOMS |
Modifier | Constructor and Description |
---|---|
private |
ZoomMenu()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
changeZoomSelection(float zoomValue)
Set the zoom selection.
|
float |
getImageZoomScale() |
static ZoomMenu |
getInstance()
Provides the ZoomMenu instance.
|
float |
getPageZoomScale() |
static float |
getZoomScale()
Tell the current zoom scale.
|
static boolean |
isZoomMenu(java.lang.String actionCommand)
Tell whether the command belongs to the zoom menu.
|
void |
resetZoom()
When a new file is loaded zoom values should be reset.
|
void |
setImageZoomScale(float imageZoomValue) |
void |
setPageZoomScale(float pageZoomValue) |
addMenuListeners, getMenu, setEnableMenu, setMenu
private float pageZoomScale
private float imageZoomScale
private static final int[] ZOOMS
private static ZoomMenu instance
private final javax.swing.JMenu menu
public static ZoomMenu getInstance()
public void changeZoomSelection(float zoomValue)
zoomValue
- e.g. 1, 0.25, 4.java.lang.IllegalArgumentException
- if the parameter doesn't belong to a zoom menu item.public static boolean isZoomMenu(java.lang.String actionCommand)
actionCommand
- a menu command string.public static float getZoomScale()
java.lang.IllegalStateException
- if no zoom menu item is selected.public float getPageZoomScale()
public void setPageZoomScale(float pageZoomValue)
public float getImageZoomScale()
public void setImageZoomScale(float imageZoomValue)
public void resetZoom()