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 Path
getDesktopDirectory()
User's desktop directory.OperatingSystem.ExternalApplication[]
getExternalApplications(URL url)
Lists the available applications for the given URL.String
getJavaRuntimeSupportVersion()
Version string for the JavaRuntimeSupportVersion.framework, available only on macOS.Path
getLocalApplicationSupportDirectory()
Local app data folder.String
getSystemAppearance()
Return the name of the system appearance.Path
getUsersMusicDirectory()
User's music folder.void
openWithExternalApplication(URL url, OperatingSystem.ExternalApplication externalApplication)
Opens the given URL with the given application.void
setThreadPriority(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:OperatingSystemSPI
Version string for the JavaRuntimeSupportVersion.framework, available only on macOS.- Specified by:
getJavaRuntimeSupportVersion
in interfaceOperatingSystemSPI
- Returns:
- version or "unknown", if not known.
-
getLocalApplicationSupportDirectory
public Path getLocalApplicationSupportDirectory()
Local app data folder.~/Library/Application Support
on macOS,~\AppData\Local
on Vista/Win7,~\Local Settings\Application Data
on Windows XP.- Specified by:
getLocalApplicationSupportDirectory
in interfaceOperatingSystemSPI
- Returns:
- local app data folder
-
getUsersMusicDirectory
public Path getUsersMusicDirectory()
User's music folder.~/Music
on macOS,~\Music
on Vista/Win7,~\My Documents\My Music
on Windows XP.- Specified by:
getUsersMusicDirectory
in interfaceOperatingSystemSPI
- Returns:
- user's music folder
-
getDesktopDirectory
public Path getDesktopDirectory()
Description copied from interface:OperatingSystemSPI
User's desktop directory.- Specified by:
getDesktopDirectory
in interfaceOperatingSystemSPI
- Returns:
- desktop directory
-
openWithExternalApplication
public void openWithExternalApplication(URL url, OperatingSystem.ExternalApplication externalApplication) throws IOException
Description copied from interface:OperatingSystemSPI
Opens the given URL with the given application.- Specified by:
openWithExternalApplication
in 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:OperatingSystemSPI
Lists the available applications for the given URL.- Specified by:
getExternalApplications
in 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:OperatingSystemSPI
Tries to force-set the given thread priority using native APIs.- Specified by:
setThreadPriority
in interfaceOperatingSystemSPI
- Parameters:
priority
- priority
-
getSystemAppearance
public String getSystemAppearance()
Description copied from interface:OperatingSystemSPI
Return the name of the system appearance.- Specified by:
getSystemAppearance
in interfaceOperatingSystemSPI
- Returns:
- appearance name
-
-