Package org.apache.pdfbox.debugger.ui
Class ZoomMenu
java.lang.Object
org.apache.pdfbox.debugger.ui.MenuBase
org.apache.pdfbox.debugger.ui.ZoomMenu
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
changeZoomSelection
(float zoomValue) Set the zoom selection.float
static ZoomMenu
Provides the ZoomMenu instance.float
static float
Tell the current zoom scale.static boolean
isZoomMenu
(String actionCommand) Tell whether the command belongs to the zoom menu.void
When a new file is loaded zoom values should be reset.void
setImageZoomScale
(float imageZoomValue) void
setPageZoomScale
(float pageZoomValue) Methods inherited from class org.apache.pdfbox.debugger.ui.MenuBase
addMenuListeners, getMenu, setEnableMenu, setMenu
-
Field Details
-
pageZoomScale
private float pageZoomScale -
imageZoomScale
private float imageZoomScale -
ZOOMS
private static final int[] ZOOMS -
instance
-
-
Constructor Details
-
ZoomMenu
private ZoomMenu()Constructor.
-
-
Method Details
-
getInstance
Provides the ZoomMenu instance.- Returns:
- ZoomMenu instance.
-
changeZoomSelection
public void changeZoomSelection(float zoomValue) Set the zoom selection.- Parameters:
zoomValue
- e.g. 1, 0.25, 4.- Throws:
IllegalArgumentException
- if the parameter doesn't belong to a zoom menu item.
-
isZoomMenu
Tell whether the command belongs to the zoom menu.- Parameters:
actionCommand
- a menu command string.- Returns:
- true if the command is a zoom menu command, e.g. "100%", false if not.
-
getZoomScale
public static float getZoomScale()Tell the current zoom scale.- Returns:
- the current zoom scale.
- Throws:
IllegalStateException
- if no zoom menu item is selected.
-
getPageZoomScale
public float getPageZoomScale() -
setPageZoomScale
public void setPageZoomScale(float pageZoomValue) -
getImageZoomScale
public float getImageZoomScale() -
setImageZoomScale
public void setImageZoomScale(float imageZoomValue) -
resetZoom
public void resetZoom()When a new file is loaded zoom values should be reset.
-