Package com.tagtraum.core
Class OperatingSystemOSX
- java.lang.Object
-
- com.tagtraum.core.OperatingSystemOSX
-
- All Implemented Interfaces:
OperatingSystemSPI
public final class OperatingSystemOSX extends Object implements OperatingSystemSPI
OperatingSystem impl for OSX.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description OperatingSystemOSX()
-
Method Summary
All Methods Instance Methods Concrete 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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.tagtraum.core.OperatingSystemSPI
showInFileBrowser
-
-
-
-
Method Detail
-
getJavaRuntimeSupportVersion
public String getJavaRuntimeSupportVersion()
Description copied from interface:OperatingSystemSPIVersion string for the JavaRuntimeSupportVersion.framework, available only on macOS.- Specified by:
getJavaRuntimeSupportVersionin interfaceOperatingSystemSPI- Returns:
- version or "unknown", if not known.
-
getLocalApplicationSupportDirectory
public Path getLocalApplicationSupportDirectory()
Local app data folder.~/Library/Application Supporton macOS,~\AppData\Localon Vista/Win7,~\Local Settings\Application Dataon Windows XP.- Specified by:
getLocalApplicationSupportDirectoryin interfaceOperatingSystemSPI- Returns:
- local app data folder
-
getUsersMusicDirectory
public Path getUsersMusicDirectory()
User's music folder.~/Musicon macOS,~\Musicon Vista/Win7,~\My Documents\My Musicon Windows XP.- Specified by:
getUsersMusicDirectoryin interfaceOperatingSystemSPI- Returns:
- user's music folder
-
getDesktopDirectory
public Path getDesktopDirectory()
Description copied from interface:OperatingSystemSPIUser's desktop directory.- Specified by:
getDesktopDirectoryin interfaceOperatingSystemSPI- Returns:
- desktop directory
-
openWithExternalApplication
public void openWithExternalApplication(URL url, OperatingSystem.ExternalApplication externalApplication) throws IOException
Description copied from interface:OperatingSystemSPIOpens the given URL with the given application.- Specified by:
openWithExternalApplicationin interfaceOperatingSystemSPI- Parameters:
url- urlexternalApplication- application- Throws:
IOException- if something goes wrong- See Also:
OperatingSystemSPI.getExternalApplications(java.net.URL)
-
getExternalApplications
public OperatingSystem.ExternalApplication[] getExternalApplications(URL url)
Description copied from interface:OperatingSystemSPILists the available applications for the given URL.- Specified by:
getExternalApplicationsin interfaceOperatingSystemSPI- Parameters:
url- url- Returns:
- list of applications - the first one should be the default application
-
setThreadPriority
public void setThreadPriority(int priority)
Description copied from interface:OperatingSystemSPITries to force-set the given thread priority using native APIs.- Specified by:
setThreadPriorityin interfaceOperatingSystemSPI- Parameters:
priority- priority
-
getSystemAppearance
public String getSystemAppearance()
Description copied from interface:OperatingSystemSPIReturn the name of the system appearance.- Specified by:
getSystemAppearancein interfaceOperatingSystemSPI- Returns:
- appearance name
-
-