Class RotationMenu

java.lang.Object
org.apache.pdfbox.debugger.ui.RotationMenu

public final class RotationMenu extends 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 Details

  • Method Details

    • getInstance

      public static RotationMenu getInstance()
      Provides the RotationMenu instance.
      Returns:
      RotationMenu instance.
    • setRotationSelection

      public void setRotationSelection(String selection)
      Set the rotation selection.
      Parameters:
      selection - String instance.
    • isRotationMenu

      public static boolean isRotationMenu(String actionCommand)
    • getRotationDegrees

      public static int getRotationDegrees()
    • getRotationDegrees

      public static int getRotationDegrees(String actionCommand)
    • setMenu

      protected void setMenu(JMenu menu)
    • getMenu

      public 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(ActionListener listener)
      Add the ActionListener for the menuitems.
      Parameters:
      listener - ActionListener.