abbot.editor
Class OSXAdapter

java.lang.Object
  extended by abbot.editor.OSXAdapter
All Implemented Interfaces:
InvocationHandler

public class OSXAdapter
extends Object
implements InvocationHandler

Provide access to OSX application hooks. Compilable on all platforms.


Method Summary
static void enablePrefs(boolean enabled)
          Another static entry point for EAWT functionality.
 void handleAbout(Object e)
           
 void handleOpenApplication(Object e)
           
 void handleOpenFile(Object e)
           
 void handlePreferences(Object e)
           
 void handlePrintFile(Object e)
           
 void handleQuit(Object e)
           
 void handleReOpenApplication(Object e)
          User clicked on application in the Dock.
 Object invoke(Object proxy, Method method, Object[] args)
          Handle all calls from the host OS.
static boolean isMac()
           
static void register(Frame owner, Action quit, Action about, Action prefs)
          Register the given special frame actions with OSX.
static void unregister(Frame owner)
          Unregister the given frame's actions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isMac

public static boolean isMac()

handleAbout

public void handleAbout(Object e)

handlePreferences

public void handlePreferences(Object e)

handleQuit

public void handleQuit(Object e)

handleReOpenApplication

public void handleReOpenApplication(Object e)
User clicked on application in the Dock.


handleOpenApplication

public void handleOpenApplication(Object e)

handleOpenFile

public void handleOpenFile(Object e)

handlePrintFile

public void handlePrintFile(Object e)

register

public static void register(Frame owner,
                            Action quit,
                            Action about,
                            Action prefs)
Register the given special frame actions with OSX. About and prefs actions may be null, but quit must be non-null.


unregister

public static void unregister(Frame owner)
Unregister the given frame's actions.


enablePrefs

public static void enablePrefs(boolean enabled)
Another static entry point for EAWT functionality. Sets the enabled stste of the "Preferences..." menu item in the application menu.


invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Handle all calls from the host OS.

Specified by:
invoke in interface InvocationHandler
Throws:
Throwable


Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge