public class OsX extends Generic implements InvocationHandler
OsX
provides a means to handle the AppleEvent for quit. Add a new OsX.QuitHandler
using OsX.addQuitHandler
to handle the event. Copyright: Copyright 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
Created on June 2, 2009Generic.QuitHandler
Modifier and Type | Field and Description |
---|---|
private Method |
addApplicationListenerMethod |
private Object |
applicationInstance |
private Class<?> |
applicationListenerClass |
private Vector<Generic.QuitHandler> |
quitHandlers |
Modifier | Constructor and Description |
---|---|
protected |
OsX()
private because singleton
|
Modifier and Type | Method and Description |
---|---|
protected Generic.QuitHandler |
addQuitHandler2(Generic.QuitHandler quitHandler)
Adds a quit event handler
|
Object |
invoke(Object proxy,
Method method,
Object[] args)
Required for a proxy object.
|
static boolean |
isMacOsX()
Indicates whether current platform is OS X
|
Image |
setDocIconImage2(Image img) |
addQuitHandler, prepareCmdList, prepareCmdList2, prepareCmdString, prepareCmdString2, setDocIconImage
private Object applicationInstance
private Method addApplicationListenerMethod
private Class<?> applicationListenerClass
private Vector<Generic.QuitHandler> quitHandlers
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
Throwable
public Image setDocIconImage2(Image img)
setDocIconImage2
in class Generic
public static final boolean isMacOsX()
protected Generic.QuitHandler addQuitHandler2(Generic.QuitHandler quitHandler)
addQuitHandler2
in class Generic
quitHandler
- to add