org.openstreetmap.josm.tools
Class PlatformHookOsx
java.lang.Object
org.openstreetmap.josm.tools.PlatformHookUnixoid
org.openstreetmap.josm.tools.PlatformHookOsx
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler, PlatformHook
public class PlatformHookOsx
- extends PlatformHookUnixoid
- implements PlatformHook, java.lang.reflect.InvocationHandler
- See Also:
PlatformHook
Method Summary |
boolean |
canFullscreen()
|
java.lang.String |
getDefaultStyle()
|
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. |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
|
java.lang.String |
makeTooltip(java.lang.String name,
Shortcut sc)
This should work for all platforms. |
void |
openUrl(java.lang.String url)
The openURL hook will be used to open an URL in the
default webbrowser. |
void |
preStartupHook()
The preStartupHook will be called extremly early. |
void |
startupHook()
The startupHook will be called early, but after the GUI
setup has started. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ivhandler
private static PlatformHookOsx ivhandler
PlatformHookOsx
public PlatformHookOsx()
preStartupHook
public void preStartupHook()
- Description copied from interface:
PlatformHook
- The preStartupHook will be called extremly early. It is
guaranteed to be called before the GUI setup has started.
Reason: On OSX we need to inform the Swing libraries
that we want to be integrated with the OS before we setup
our GUI.
- Specified by:
preStartupHook
in interface PlatformHook
- Overrides:
preStartupHook
in class PlatformHookUnixoid
startupHook
public void startupHook()
- Description copied from interface:
PlatformHook
- The startupHook will be called early, but after the GUI
setup has started.
Reason: On OSX we need to register some callbacks with the
OS, so we'll receive events from the system menu.
- Specified by:
startupHook
in interface PlatformHook
- Overrides:
startupHook
in class PlatformHookUnixoid
invoke
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- Specified by:
invoke
in interface java.lang.reflect.InvocationHandler
- Throws:
java.lang.Throwable
openUrl
public void openUrl(java.lang.String url)
throws java.io.IOException
- Description copied from interface:
PlatformHook
- The openURL hook will be used to open an URL in the
default webbrowser.
- Specified by:
openUrl
in interface PlatformHook
- Overrides:
openUrl
in class PlatformHookUnixoid
- Throws:
java.io.IOException
initSystemShortcuts
public void initSystemShortcuts()
- Description copied from interface:
PlatformHook
- 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.
Plese note that you are not allowed to register any
shortuts from this hook, but only "systemCuts"!
BTW: SystemCuts should be named "system:",
and it'd be best if sou'd recycle the names already used
by the Windows and OSX hooks. Especially the later has
really many of them.
You should also register any and all shortcuts that the
operation system handles itself to block JOSM from trying
to use them---as that would just not work. Call setAutomatic
on them to prevent the keyboard preferences from allowing the
user to change them.
- Specified by:
initSystemShortcuts
in interface PlatformHook
- Overrides:
initSystemShortcuts
in class PlatformHookUnixoid
makeTooltip
public java.lang.String makeTooltip(java.lang.String name,
Shortcut sc)
- Description copied from class:
PlatformHookUnixoid
- This should work for all platforms. Yeah, should.
See PlatformHook.java for a list of reasons why
this is implemented here...
- Specified by:
makeTooltip
in interface PlatformHook
- Overrides:
makeTooltip
in class PlatformHookUnixoid
getDefaultStyle
public java.lang.String getDefaultStyle()
- Specified by:
getDefaultStyle
in interface PlatformHook
- Overrides:
getDefaultStyle
in class PlatformHookUnixoid
canFullscreen
public boolean canFullscreen()
- Specified by:
canFullscreen
in interface PlatformHook
- Overrides:
canFullscreen
in class PlatformHookUnixoid
JOSM