Package org.apache.pdfbox.debugger.ui
Class RotationMenu
java.lang.Object
org.apache.pdfbox.debugger.ui.RotationMenu
- Author:
- Khyrul Bashar, Tilman Hausherr A singleton class that provides rotation menu which can be used to show rotation menu in the menubar. To act upon the menu item selection user of the class must add ActionListener which will check for the action command and act accordingly.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMenuListeners
(ActionListener listener) Add the ActionListener for the menuitems.static RotationMenu
Provides the RotationMenu instance.getMenu()
Provide the JMenu instance of the ZoomMenu.static int
static int
getRotationDegrees
(String actionCommand) static boolean
isRotationMenu
(String actionCommand) void
setEnableMenu
(boolean isEnable) Set if the menu should be enabled or disabled.protected void
void
setRotationSelection
(String selection) Set the rotation selection.
-
Field Details
-
ROTATE_0_DEGREES
- See Also:
-
ROTATE_90_DEGREES
- See Also:
-
ROTATE_180_DEGREES
- See Also:
-
ROTATE_270_DEGREES
- See Also:
-
-
Method Details
-
getInstance
Provides the RotationMenu instance.- Returns:
- RotationMenu instance.
-
setRotationSelection
Set the rotation selection.- Parameters:
selection
- String instance.
-
isRotationMenu
-
getRotationDegrees
public static int getRotationDegrees() -
getRotationDegrees
-
setMenu
-
getMenu
Provide the JMenu instance of the ZoomMenu.- Returns:
- JMenu instance.
-
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 menuitems.- Parameters:
listener
- ActionListener.
-