Class RenderDestinationMenu


  • public final class RenderDestinationMenu
    extends java.lang.Object
    Author:
    Tilman Hausherr A singleton class that provides the RenderDestination 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.
    • Field Detail

      • RENDER_DESTINATION_EXPORT

        public static final java.lang.String RENDER_DESTINATION_EXPORT
        See Also:
        Constant Field Values
      • RENDER_DESTINATION_PRINT

        public static final java.lang.String RENDER_DESTINATION_PRINT
        See Also:
        Constant Field Values
      • RENDER_DESTINATION_VIEW

        public static final java.lang.String RENDER_DESTINATION_VIEW
        See Also:
        Constant Field Values
    • Method Detail

      • getInstance

        public static RenderDestinationMenu getInstance()
        Provides the RenderDestination instance.
        Returns:
        RenderDestination instance.
      • setRenderDestinationSelection

        public void setRenderDestinationSelection​(java.lang.String selection)
        Set the render destination selection.
        Parameters:
        selection - String instance.
      • isRenderDestinationMenu

        public static boolean isRenderDestinationMenu​(java.lang.String actionCommand)
      • getRenderDestination

        public static org.apache.pdfbox.rendering.RenderDestination getRenderDestination()
      • getRenderDestination

        public static org.apache.pdfbox.rendering.RenderDestination getRenderDestination​(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.