public final class ZoomMenu extends Object
Modifier and Type | Method and Description |
---|---|
void |
addMenuListeners(ActionListener listener)
Add the ActionListener for the menuitems.
|
void |
changeZoomSelection(float zoomValue)
Set the zoom selection.
|
float |
getImageZoomScale() |
static ZoomMenu |
getInstance()
Provides the ZoomMenu instance.
|
JMenu |
getMenu()
Provide the JMenu instance of the ZoomMenu.
|
float |
getPageZoomScale() |
static float |
getZoomScale()
Tell the current zoom scale.
|
static boolean |
isZoomMenu(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 |
setEnableMenu(boolean isEnable)
Set if the menu should be enabled or disabled.
|
void |
setImageZoomScale(float imageZoomValue) |
protected void |
setMenu(JMenu menu) |
void |
setPageZoomScale(float pageZoomValue) |
public static ZoomMenu getInstance()
public void changeZoomSelection(float zoomValue)
zoomValue
- e.g. 1, 0.25, 4.IllegalArgumentException
- if the parameter doesn't belong to a zoom menu item.public static boolean isZoomMenu(String actionCommand)
actionCommand
- a menu command string.public static float getZoomScale()
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()
protected void setMenu(JMenu menu)
public JMenu getMenu()
public void setEnableMenu(boolean isEnable)
isEnable
- boolean instance.public void addMenuListeners(ActionListener listener)
listener
- ActionListener.Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.