Class ImageTypeMenu


  • public final class ImageTypeMenu
    extends java.lang.Object
    Author:
    Tilman Hausherr A singleton class that provides the imagetype menu for the menubar. To act upon the menu item selection, the user of the class must add ActionListener which will check for the action command and act accordingly.
    • 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 menuitems.
      static org.apache.pdfbox.rendering.ImageType getImageType()  
      static org.apache.pdfbox.rendering.ImageType getImageType​(java.lang.String actionCommand)  
      static ImageTypeMenu getInstance()
      Provides the ImageTypeMenu instance.
      javax.swing.JMenu getMenu()
      Provide the JMenu instance of the ZoomMenu.
      static boolean isImageTypeMenu​(java.lang.String actionCommand)  
      void setEnableMenu​(boolean isEnable)
      Set if the menu should be enabled or disabled.
      void setImageTypeSelection​(java.lang.String selection)
      Set the image type selection.
      protected void setMenu​(javax.swing.JMenu menu)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static ImageTypeMenu getInstance()
        Provides the ImageTypeMenu instance.
        Returns:
        ImageTypeMenu instance.
      • setImageTypeSelection

        public void setImageTypeSelection​(java.lang.String selection)
        Set the image type selection.
        Parameters:
        selection - String instance.
      • isImageTypeMenu

        public static boolean isImageTypeMenu​(java.lang.String actionCommand)
      • getImageType

        public static org.apache.pdfbox.rendering.ImageType getImageType()
      • getImageType

        public static org.apache.pdfbox.rendering.ImageType getImageType​(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 menuitems.
        Parameters:
        listener - ActionListener.