Class PrintDpiMenu
java.lang.Object
org.apache.pdfbox.debugger.ui.PrintDpiMenu
- Author:
- Tilman Hausherr A singleton class that provides the print dpi menu.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMenuListeners(ActionListener listener) Add the ActionListener for the menu items.voidchangeDpiSelection(int selection) Set the dpi selection.static intTell the current dpi scale.static PrintDpiMenuProvides the DpiMenu instance.getMenu()Provide the JMenu instance of the ZoomMenu.voidsetEnableMenu(boolean isEnable) Set if the menu should be enabled or disabled.protected void
-
Method Details
-
getInstance
-
changeDpiSelection
public void changeDpiSelection(int selection) Set the dpi selection.- Parameters:
selection-- Throws:
IllegalArgumentException- if the parameter doesn't belong to a dpi menu item.
-
getDpiSelection
public static int getDpiSelection()Tell the current dpi scale.- Returns:
- the current dpi scale.
- Throws:
IllegalStateException- if no dpi menu item is selected.
-
setMenu
-
getMenu
-
setEnableMenu
public void setEnableMenu(boolean isEnable) Set if the menu should be enabled or disabled.- Parameters:
isEnable- boolean instance.
-
addMenuListeners
Add the ActionListener for the menu items.- Parameters:
listener- ActionListener.
-