public class PlatformHookOsx extends PlatformHookUnixoid implements PlatformHook, InvocationHandler
PlatformHook
implementation for Apple Mac OS X systems.PlatformHookUnixoid.FontEntry, PlatformHookUnixoid.LinuxReleaseInfo
Modifier and Type | Field and Description |
---|---|
private static PlatformHookOsx |
ivhandler |
Constructor and Description |
---|
PlatformHookOsx() |
Modifier and Type | Method and Description |
---|---|
boolean |
canFullscreen()
Determines if the platform allows full-screen.
|
static void |
enableOSXFullscreen(Window window)
Enables fullscreen support for the given window.
|
File |
getDefaultCacheDirectory()
Returns the platform-dependent default cache directory.
|
File |
getDefaultPrefDirectory()
Returns the platform-dependent default preferences directory.
|
String |
getDefaultStyle()
Returns the default LAF to be used on this platform to look almost as a native application.
|
File |
getDefaultUserDataDirectory()
Returns the platform-dependent default user data directory.
|
String |
getOSDescription()
Returns a detailed OS description (at least family + version).
|
void |
initSystemShortcuts()
The initSystemShortcuts hook will be called by the
Shortcut class after the modifier groups have been read
from the config, but before any shortcuts are read from
it or registered from within the application.
|
Object |
invoke(Object proxy,
Method method,
Object[] args) |
String |
makeTooltip(String name,
Shortcut sc)
This should work for all platforms.
|
static void |
migrateOldDirectory()
Prior to r7834, JOSM used the same Unix directory ~/.josm for all local files (preferences,
caches, user data).
|
void |
openUrl(String url)
The openURL hook will be used to open an URL in the
default web browser.
|
void |
preStartupHook()
The preStartupHook will be called extremly early.
|
void |
startupHook()
The startupHook will be called early, but after the GUI
setup has started.
|
afterPrefStartupHook, askUpdateJava, askUpdateJava, buildOSDescription, extendFontconfig, getAdditionalFonts, getInstalledFonts, getJavaPackageDetails, getPackageDetails, getWebStartPackageDetails, isOpenJDK, rename, setupHttpsCertificate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterPrefStartupHook, rename, setupHttpsCertificate
private static PlatformHookOsx ivhandler
public PlatformHookOsx()
public void preStartupHook()
PlatformHook
preStartupHook
in interface PlatformHook
preStartupHook
in class PlatformHookUnixoid
public void startupHook()
PlatformHook
startupHook
in interface PlatformHook
startupHook
in class PlatformHookUnixoid
public static void enableOSXFullscreen(Window window)
window
- The window for which full screen will be availablepublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
Throwable
public void openUrl(String url) throws IOException
PlatformHook
openUrl
in interface PlatformHook
openUrl
in class PlatformHookUnixoid
url
- The URL to openIOException
- if any I/O error occurspublic void initSystemShortcuts()
PlatformHook
initSystemShortcuts
in interface PlatformHook
initSystemShortcuts
in class PlatformHookUnixoid
public String makeTooltip(String name, Shortcut sc)
PlatformHookUnixoid
makeTooltip
in interface PlatformHook
makeTooltip
in class PlatformHookUnixoid
name
- Tooltip text to displaysc
- Shortcut associated (to display accelerator between parenthesis)public String getDefaultStyle()
PlatformHook
getDefaultStyle
in interface PlatformHook
getDefaultStyle
in class PlatformHookUnixoid
public boolean canFullscreen()
PlatformHook
canFullscreen
in interface PlatformHook
canFullscreen
in class PlatformHookUnixoid
true
if full screen is allowed, false
otherwisepublic String getOSDescription()
PlatformHook
getOSDescription
in interface PlatformHook
getOSDescription
in class PlatformHookUnixoid
public File getDefaultCacheDirectory()
PlatformHook
getDefaultCacheDirectory
in interface PlatformHook
getDefaultCacheDirectory
in class PlatformHookUnixoid
public File getDefaultPrefDirectory()
PlatformHook
getDefaultPrefDirectory
in interface PlatformHook
getDefaultPrefDirectory
in class PlatformHookUnixoid
public File getDefaultUserDataDirectory()
PlatformHook
getDefaultUserDataDirectory
in interface PlatformHook
getDefaultUserDataDirectory
in class PlatformHookUnixoid
public static void migrateOldDirectory()