- java.lang.Object
-
- org.scijava.platform.AbstractPlatform
-
- org.scijava.desktop.platform.windows.WindowsPlatform
-
- All Implemented Interfaces:
DesktopIntegrationProvider,org.scijava.Disposable,org.scijava.platform.Platform,org.scijava.plugin.SciJavaPlugin,org.scijava.plugin.SingletonPlugin
public class WindowsPlatform extends org.scijava.platform.AbstractPlatform implements DesktopIntegrationProvider
A platform implementation for handling Windows platform issues.- Author:
- Johannes Schindelin, Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description WindowsPlatform()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SchemeInstallergetSchemeInstaller()Creates a SchemeInstaller for this platform.booleanisDesktopIconPresent()booleanisDesktopIconToggleable()booleanisFileExtensionsEnabled()booleanisFileExtensionsToggleable()booleanisWebLinksEnabled()booleanisWebLinksToggleable()voidopen(URL url)StringosName()voidsetDesktopIconPresent(boolean install)Installs or removes the desktop icon (application launcher, menu entry).voidsetFileExtensionsEnabled(boolean enable)Enables or disables file extension associations (e.g.,.tif,.png).voidsetWebLinksEnabled(boolean enable)Enables or disables URI scheme registration (e.g.,myapp://links).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.scijava.desktop.DesktopIntegrationProvider
syncDesktopIntegration
-
-
-
-
Method Detail
-
osName
public String osName()
- Specified by:
osNamein interfaceorg.scijava.platform.Platform
-
open
public void open(URL url) throws IOException
- Specified by:
openin interfaceorg.scijava.platform.Platform- Throws:
IOException
-
isWebLinksEnabled
public boolean isWebLinksEnabled()
- Specified by:
isWebLinksEnabledin interfaceDesktopIntegrationProvider
-
isWebLinksToggleable
public boolean isWebLinksToggleable()
- Specified by:
isWebLinksToggleablein interfaceDesktopIntegrationProvider
-
setWebLinksEnabled
public void setWebLinksEnabled(boolean enable) throws IOExceptionDescription copied from interface:DesktopIntegrationProviderEnables or disables URI scheme registration (e.g.,myapp://links).This operation only works if
DesktopIntegrationProvider.isWebLinksToggleable()returns true. Otherwise, calling this method may throwUnsupportedOperationException.- Specified by:
setWebLinksEnabledin interfaceDesktopIntegrationProvider- Parameters:
enable- whether to enable or disable web links- Throws:
IOException- if the operation fails
-
isDesktopIconPresent
public boolean isDesktopIconPresent()
- Specified by:
isDesktopIconPresentin interfaceDesktopIntegrationProvider
-
isDesktopIconToggleable
public boolean isDesktopIconToggleable()
- Specified by:
isDesktopIconToggleablein interfaceDesktopIntegrationProvider
-
setDesktopIconPresent
public void setDesktopIconPresent(boolean install)
Description copied from interface:DesktopIntegrationProviderInstalls or removes the desktop icon (application launcher, menu entry).This operation only works if
DesktopIntegrationProvider.isDesktopIconToggleable()returns true. Otherwise, calling this method may throwUnsupportedOperationException.- Specified by:
setDesktopIconPresentin interfaceDesktopIntegrationProvider- Parameters:
install- whether to install or remove the desktop icon
-
isFileExtensionsEnabled
public boolean isFileExtensionsEnabled()
- Specified by:
isFileExtensionsEnabledin interfaceDesktopIntegrationProvider
-
isFileExtensionsToggleable
public boolean isFileExtensionsToggleable()
- Specified by:
isFileExtensionsToggleablein interfaceDesktopIntegrationProvider
-
setFileExtensionsEnabled
public void setFileExtensionsEnabled(boolean enable) throws IOExceptionDescription copied from interface:DesktopIntegrationProviderEnables or disables file extension associations (e.g.,.tif,.png).This operation only works if
DesktopIntegrationProvider.isFileExtensionsToggleable()returns true. Otherwise, calling this method may throwUnsupportedOperationException.When enabled, the application will be registered as a handler for all supported file extensions. The application appears in "Open With" menus, allowing users to choose it for specific file types.
- Specified by:
setFileExtensionsEnabledin interfaceDesktopIntegrationProvider- Parameters:
enable- whether to enable or disable file extension associations- Throws:
IOException- if the operation fails
-
getSchemeInstaller
public SchemeInstaller getSchemeInstaller()
Description copied from interface:DesktopIntegrationProviderCreates a SchemeInstaller for this platform.- Specified by:
getSchemeInstallerin interfaceDesktopIntegrationProvider- Returns:
- a SchemeInstaller, or null if not supported on this platform
-
-