Class FullScreenMode


  • public class FullScreenMode
    extends ViewerWidget
    Create a menu item that will display the Document in "Full Screen" mode. Pressing escape will exit form this mode. This feature may also be run as the result of a named action or the documents initial view setting (see PDF.setOption("view.fullscreen")). The name of this feature is FullScreen

    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.8.2
    • Constructor Detail

      • FullScreenMode

        public FullScreenMode()
    • Method Detail

      • isFullScreen

        public boolean isFullScreen​(DocumentViewport viewport)
        Return true if the specified Viewport is currently a fullscreen viewport
        Parameters:
        viewport - the DocumentViewport
        Since:
        2.28
      • setFullScreen

        public void setFullScreen​(boolean fullscreen,
                                  DocumentViewport viewport)
        Set the specified Viewport to be the fullscreen viewport or not. The viewport will fire a "fullScreen" PropertyChangeEvent when the operation has completed.
        Parameters:
        fullscreen - whether to display the viewport as fullscreen
        viewport - the DocumentViewport
      • setFullScreen

        public void setFullScreen​(boolean fullscreen,
                                  DocumentViewport viewport,
                                  Runnable runnable)
        Set the specified Viewport to be the fullscreen viewport or not. The viewport will fire a "fullScreen" PropertyChangeEvent when the operation has completed, and if runnable is not null, it will run that task.
        Parameters:
        fullscreen - whether to display the viewport as fullscreen
        viewport - the DocumentViewport
        runnable - an optional task to run when the operation has completed.
        Since:
        2.28