Class DesktopSupport
- java.lang.Object
-
- org.faceless.pdf2.viewer2.ViewerFeature
-
- org.faceless.pdf2.viewer2.feature.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.The name of this feature is DesktopSupporttaskbarIcon true
orfalse
, forsetTaskbarIcon(boolean)
, or the path to an image resource to use that instead of the default - the value is passed tosetTaskbarIconResource(java.lang.String)
.moveMenus true
orfalse
, forsetMoveMenus(boolean)
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 Summary
Constructors Constructor Description DesktopSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
initialize(PDFViewer viewer)
Called when the feature is first added to a viewervoid
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 systemvoid
setTaskbarIcon(boolean taskbaricon)
Set whether to set the taskbar icon.void
setTaskbarIconResource(String resourcename)
Set the path to the resource to use for the taskbar icon.-
Methods inherited from class org.faceless.pdf2.viewer2.ViewerFeature
getAllEnabledFeatures, getAllFeatures, getCustomJavaScript, getFeatureProperty, getFeatureURLProperty, getName, isEnabledByDefault, setFeatureName, teardown, toString
-
-
-
-
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
-
initialize
public void initialize(PDFViewer viewer)
Description copied from class:ViewerFeature
Called when the feature is first added to a viewer- Overrides:
initialize
in classViewerFeature
-
-