-
- All Superinterfaces:
Comparable<org.scijava.Prioritized>,org.scijava.Contextual,org.scijava.Disposable,org.scijava.plugin.HasPluginInfo,org.scijava.Identifiable,org.scijava.Initializable,org.scijava.Locatable,org.scijava.log.Logged,org.scijava.Prioritized,org.scijava.plugin.RichPlugin,org.scijava.plugin.SciJavaPlugin,org.scijava.service.SciJavaService,org.scijava.service.Service,org.scijava.Versioned
- All Known Implementing Classes:
DefaultDesktopService
public interface DesktopService extends org.scijava.service.SciJavaServiceService interface for an application's desktop-related concerns.- Author:
- Curtis Rueden
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidaddFileType(String ext, String mimeType)Adds a single file type.voidaddFileType(String ext, String mimeType, String description)Adds a single file type.default voidaddFileTypes(List<String> extensions, String mimeType)Adds a batch of file types sharing the same MIME type or wildcard.default voidaddFileTypes(List<String> extensions, String mimeType, String description)Adds a batch of file types sharing the same MIME type or wildcard.voidaddFileTypes(org.scijava.object.LazyObjects<FileType> fileTypes)Adds a batch of file types to be coelesced lazily at registration time.StringgetDescription(String extension)Gets the description for a given file type extension, or null if none.Map<String,String>getFileTypes()Gets the map of supported file types (extension → MIME type).booleanisDesktopIconPresent()TODO javadocbooleanisDesktopIconToggleable()TODO javadocbooleanisFileExtensionsEnabled()TODO javadocbooleanisFileExtensionsToggleable()TODO javadocbooleanisWebLinksEnabled()TODO javadocbooleanisWebLinksToggleable()TODO javadocvoidsyncDesktopIntegration(boolean webLinks, boolean desktopIcon, boolean fileTypes)Applies desktop integration settings.
-
-
-
Method Detail
-
syncDesktopIntegration
void syncDesktopIntegration(boolean webLinks, boolean desktopIcon, boolean fileTypes)Applies desktop integration settings.The behavior of each setting is platform-specific; not all settings have an effect on every platform.
- Parameters:
webLinks- whether URI scheme handlers should be registereddesktopIcon- whether the application launcher entry should be presentfileTypes- whether file-extension associations should be registered
-
isDesktopIconToggleable
boolean isDesktopIconToggleable()
TODO javadoc
-
isDesktopIconPresent
boolean isDesktopIconPresent()
TODO javadoc
-
isWebLinksToggleable
boolean isWebLinksToggleable()
TODO javadoc
-
isWebLinksEnabled
boolean isWebLinksEnabled()
TODO javadoc
-
isFileExtensionsToggleable
boolean isFileExtensionsToggleable()
TODO javadoc
-
isFileExtensionsEnabled
boolean isFileExtensionsEnabled()
TODO javadoc
-
addFileType
default void addFileType(String ext, String mimeType)
Adds a single file type.- Parameters:
ext- File extension without leading dot (e.g."png").mimeType- MIME type (e.g."image/png"), or a wildcard of the form"category/*"(e.g."image/*") if the specific type is unknown. Wildcard values are resolved against the bundled MIME database by extension; if still unresolved, the sentinel is preserved for platform-specific code to handle at OS registration time.
-
addFileType
void addFileType(String ext, String mimeType, String description)
Adds a single file type.- Parameters:
ext- File extension without leading dot (e.g."png").mimeType- MIME type (e.g."image/png"), or a wildcard of the form"category/*"(e.g."image/*") if the specific type is unknown. Wildcard values are resolved against the bundled MIME database by extension; if still unresolved, the sentinel is preserved for platform-specific code to handle at OS registration time.description- Human-readable description of the file type (e.g."Gatan Digital Micrograph image"), used as the label when registering a custom MIME type, ornullto synthesize one from the extension.
-
addFileTypes
default void addFileTypes(List<String> extensions, String mimeType)
Adds a batch of file types sharing the same MIME type or wildcard. Equivalent to callingaddFileType(String, String)for each extension.- Parameters:
extensions- File extensions without leading dot (e.g."tiff","tif").mimeType- MIME type or wildcard; seeaddFileType(String, String).
-
addFileTypes
default void addFileTypes(List<String> extensions, String mimeType, String description)
Adds a batch of file types sharing the same MIME type or wildcard. Equivalent to callingaddFileType(String, String, String)for each extension.- Parameters:
extensions- File extensions without leading dot (e.g."tiff","tif").mimeType- MIME type or wildcard; seeaddFileType(String, String, String).description- Shared description for all extensions in this batch; seeaddFileType(String, String, String).
-
addFileTypes
void addFileTypes(org.scijava.object.LazyObjects<FileType> fileTypes)
Adds a batch of file types to be coelesced lazily at registration time.- Parameters:
fileTypes- Lazy callback to be invoked later when file types are needed.
-
getFileTypes
Map<String,String> getFileTypes()
Gets the map of supported file types (extension → MIME type).Values ending in
"/*"(e.g."image/*") are unresolved sentinels, meaning the specific MIME type is not yet known. Callers that write OS registrations should resolve these against the system MIME database and synthesize a concrete type (e.g."image/x-dm3") if still unresolved.
-
-