Class DesktopSupport


  • public class DesktopSupport
    extends ViewerFeature

    This feature can be added to the viewer in Java 9 or later to make the viewer player nicely with the Desktop, Taskbar and so on. Prior to 2.26.2 this was called AppleSupport and was macOS-specific. It's enabled by default but will have no effect prior to Java 9.

    The following initialization parameters can be specified to configure this feature.
    taskbarIcontrue or false, for setTaskbarIcon(boolean), or the path to an image resource to use that instead of the default - the value is passed to setTaskbarIconResource(java.lang.String).
    moveMenustrue or false, for setMoveMenus(boolean)
    The name of this feature is DesktopSupport

    This code is copyright the Big Faceless Organization. You're welcome to use, modify and distribute it in any form in your own projects, provided those projects continue to make use of the Big Faceless PDF library.

    Since:
    2.11.1
    • Constructor Detail

      • DesktopSupport

        public DesktopSupport()
    • Method Detail

      • setMoveMenus

        public void setMoveMenus​(boolean menus)
        Set whether to move the menus from the application window to the System menu bar and set the about/quit menus to work , if that's supported by the operating system
        Parameters:
        menus - whether to move the menus or not
        Since:
        2.11.6
      • setTaskbarIcon

        public void setTaskbarIcon​(boolean taskbaricon)
        Set whether to set the taskbar icon. The default is true.
        Parameters:
        taskbaricon - whether to customize the taskbar icon
        Since:
        2.11.6
      • setTaskbarIconResource

        public void setTaskbarIconResource​(String resourcename)
        Set the path to the resource to use for the taskbar icon. The default is "resources/bfodockicon.png" - it will be resolved against this class.
        Since:
        2.16