org.openstreetmap.josm.tools
Class PlatformHookUnixoid

java.lang.Object
  extended by org.openstreetmap.josm.tools.PlatformHookUnixoid
All Implemented Interfaces:
PlatformHook
Direct Known Subclasses:
PlatformHookOsx, PlatformHookWindows

public class PlatformHookUnixoid
extends java.lang.Object
implements PlatformHook

see PlatformHook.java BTW: THIS IS A STUB. See comments below for details. Don't write (Main.platform instanceof PlatformHookUnixoid) because other platform hooks are subclasses of this class.


Constructor Summary
PlatformHookUnixoid()
           
 
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.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.
 boolean rename(java.io.File from, java.io.File to)
           
 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
 

Constructor Detail

PlatformHookUnixoid

public PlatformHookUnixoid()
Method Detail

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

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

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
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

makeTooltip

public java.lang.String makeTooltip(java.lang.String name,
                                    Shortcut sc)
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

getDefaultStyle

public java.lang.String getDefaultStyle()
Specified by:
getDefaultStyle in interface PlatformHook

canFullscreen

public boolean canFullscreen()
Specified by:
canFullscreen in interface PlatformHook

rename

public boolean rename(java.io.File from,
                      java.io.File to)
Specified by:
rename in interface PlatformHook


JOSM