sears.tools.eawt
Class ApplicationWrapper

java.lang.Object
  extended by sears.tools.eawt.ApplicationWrapper

public class ApplicationWrapper
extends java.lang.Object

this class is a wrap class of class com.apple.eawt.Application
With this class we can access to the method of the Apple class.


Constructor Summary
ApplicationWrapper()
          Construct a new ApplicationWrapper object, get back Classes and methods
 
Method Summary
 void addApplicationListener(java.util.EventListener listener)
          com.apple.eawt.ApplicationListener#addApplicationListener(com.apple.eawt.ApplicationEvent)
Adds the specified ApplicationListener as a receiver of callbacks from this class.
 void addPreferencesMenuItem()
          com.apple.eawt.Application#addPreferencesMenuItem()
Adds the Preferences item to the application menu if the item is not already present.
static ApplicationWrapper getApplication()
          this method return an instance object of the class
 void setEnabledPreferencesMenu(boolean enable)
          com.apple.eawt.ApplicationListener#setEnabledPreferencesMenu(boolean)
Enables the About item in the application menu.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationWrapper

public ApplicationWrapper()
                   throws AppException
Construct a new ApplicationWrapper object, get back Classes and methods

Throws:
AppException - if an error occurs during initialization
Method Detail

getApplication

public static ApplicationWrapper getApplication()
                                         throws AppException
this method return an instance object of the class

Returns:
an instance of the class
Throws:
AppException - if instantiation failed

addPreferencesMenuItem

public void addPreferencesMenuItem()
com.apple.eawt.Application#addPreferencesMenuItem()
Adds the Preferences item to the application menu if the item is not already present.


setEnabledPreferencesMenu

public void setEnabledPreferencesMenu(boolean enable)
com.apple.eawt.ApplicationListener#setEnabledPreferencesMenu(boolean)
Enables the About item in the application menu.

Parameters:
enable - specifies whether the About item in the application menu should be enabled (true) or not (false)

addApplicationListener

public void addApplicationListener(java.util.EventListener listener)
com.apple.eawt.ApplicationListener#addApplicationListener(com.apple.eawt.ApplicationEvent)
Adds the specified ApplicationListener as a receiver of callbacks from this class. if listener is not an implementation of ApplicationListener this method is no op

Parameters:
listener - an implementation of ApplicationListener that handles ApplicationEvents generated by this class