Package org.apache.pdfbox.debugger.ui
Class RotationMenu
- java.lang.Object
-
- org.apache.pdfbox.debugger.ui.RotationMenu
-
public final class RotationMenu extends java.lang.Object
- 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 Modifier and Type Field Description static java.lang.String
ROTATE_0_DEGREES
static java.lang.String
ROTATE_180_DEGREES
static java.lang.String
ROTATE_270_DEGREES
static java.lang.String
ROTATE_90_DEGREES
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMenuListeners(java.awt.event.ActionListener listener)
Add the ActionListener for the menu items.static RotationMenu
getInstance()
Provides the RotationMenu instance.javax.swing.JMenu
getMenu()
Provide the JMenu instance of the ZoomMenu.static int
getRotationDegrees()
static int
getRotationDegrees(java.lang.String actionCommand)
static boolean
isRotationMenu(java.lang.String actionCommand)
void
setEnableMenu(boolean isEnable)
Set if the menu should be enabled or disabled.protected void
setMenu(javax.swing.JMenu menu)
void
setRotationSelection(java.lang.String selection)
Set the rotation selection.
-
-
-
Field Detail
-
ROTATE_0_DEGREES
public static final java.lang.String ROTATE_0_DEGREES
- See Also:
- Constant Field Values
-
ROTATE_90_DEGREES
public static final java.lang.String ROTATE_90_DEGREES
- See Also:
- Constant Field Values
-
ROTATE_180_DEGREES
public static final java.lang.String ROTATE_180_DEGREES
- See Also:
- Constant Field Values
-
ROTATE_270_DEGREES
public static final java.lang.String ROTATE_270_DEGREES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static RotationMenu getInstance()
Provides the RotationMenu instance.- Returns:
- RotationMenu instance.
-
setRotationSelection
public void setRotationSelection(java.lang.String selection)
Set the rotation selection.- Parameters:
selection
- String instance.
-
isRotationMenu
public static boolean isRotationMenu(java.lang.String actionCommand)
-
getRotationDegrees
public static int getRotationDegrees()
-
getRotationDegrees
public static int getRotationDegrees(java.lang.String actionCommand)
-
setMenu
protected void setMenu(javax.swing.JMenu menu)
-
getMenu
public javax.swing.JMenu 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
public void addMenuListeners(java.awt.event.ActionListener listener)
Add the ActionListener for the menu items.- Parameters:
listener
- ActionListener.
-
-