Class DefaultDesktopService

    • Constructor Detail

      • DefaultDesktopService

        public DefaultDesktopService()
    • Method Detail

      • syncDesktopIntegration

        public void syncDesktopIntegration​(boolean webLinks,
                                           boolean desktopIcon,
                                           boolean fileTypes)
        Description copied from interface: DesktopService
        Applies desktop integration settings.

        The behavior of each setting is platform-specific; not all settings have an effect on every platform.

        Specified by:
        syncDesktopIntegration in interface DesktopService
        Parameters:
        webLinks - whether URI scheme handlers should be registered
        desktopIcon - whether the application launcher entry should be present
        fileTypes - whether file-extension associations should be registered
      • addFileType

        public void addFileType​(String extension,
                                String mimeType,
                                String description)
        Description copied from interface: DesktopService
        Adds a single file type.
        Specified by:
        addFileType in interface DesktopService
        Parameters:
        extension - 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, or null to synthesize one from the extension.
      • getFileTypes

        public Map<String,​String> getFileTypes()
        Description copied from interface: DesktopService
        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.

        Specified by:
        getFileTypes in interface DesktopService