Package com.tagtraum.core
Interface OperatingSystemSPI
-
- All Known Implementing Classes:
OperatingSystemOSX
public interface OperatingSystemSPIOperatingSystemSPI.- Author:
- Hendrik Schreiber
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PathgetDesktopDirectory()User's desktop directory.OperatingSystem.ExternalApplication[]getExternalApplications(URL url)Lists the available applications for the given URL.StringgetJavaRuntimeSupportVersion()Version string for the JavaRuntimeSupportVersion.framework, available only on macOS.PathgetLocalApplicationSupportDirectory()Local app data folder.StringgetSystemAppearance()Return the name of the system appearance.PathgetUsersMusicDirectory()User's music folder.voidopenWithExternalApplication(URL url, OperatingSystem.ExternalApplication externalApplication)Opens the given URL with the given application.voidsetThreadPriority(int priority)Tries to force-set the given thread priority using native APIs.default voidshowInFileBrowser(Path file)Fallback implementation.
-
-
-
Method Detail
-
getJavaRuntimeSupportVersion
String getJavaRuntimeSupportVersion()
Version string for the JavaRuntimeSupportVersion.framework, available only on macOS.- Returns:
- version or "unknown", if not known.
-
getLocalApplicationSupportDirectory
Path getLocalApplicationSupportDirectory()
Local app data folder.~/Library/Application Supporton macOS,~\AppData\Localon Vista,~\Local Settings\Application Dataon Windows XP.- Returns:
- local app data folder
-
getUsersMusicDirectory
Path getUsersMusicDirectory()
User's music folder.~/Musicon macOS,~\Musicon Vista/Win7,~\My Documents\My Musicon Windows XP.- Returns:
- user's music folder
-
getDesktopDirectory
Path getDesktopDirectory()
User's desktop directory.- Returns:
- desktop directory
-
openWithExternalApplication
void openWithExternalApplication(URL url, OperatingSystem.ExternalApplication externalApplication) throws IOException
Opens the given URL with the given application.- Parameters:
url- urlexternalApplication- application- Throws:
IOException- if something goes wrong- See Also:
getExternalApplications(java.net.URL)
-
getExternalApplications
OperatingSystem.ExternalApplication[] getExternalApplications(URL url)
Lists the available applications for the given URL.- Parameters:
url- url- Returns:
- list of applications - the first one should be the default application
-
setThreadPriority
void setThreadPriority(int priority)
Tries to force-set the given thread priority using native APIs.- Parameters:
priority- priority
-
getSystemAppearance
String getSystemAppearance()
Return the name of the system appearance.- Returns:
- appearance name
-
showInFileBrowser
default void showInFileBrowser(Path file) throws IOException
Fallback implementation.- Parameters:
file- file- Throws:
IOException- exception
-
-