< prev index next >

src/java.desktop/macosx/classes/com/apple/eawt/ApplicationListener.java

Print this page




  30 /**
  31  * ApplicationEvents are deprecated. Use individual AppEvent listeners or handlers instead.
  32  *
  33  * @see Application#addAppEventListener(AppEventListener)
  34  *
  35  * @see AboutHandler
  36  * @see PreferencesHandler
  37  * @see OpenURIHandler
  38  * @see OpenFilesHandler
  39  * @see PrintFilesHandler
  40  * @see QuitHandler
  41  *
  42  * @see AppReOpenedListener
  43  * @see AppForegroundListener
  44  * @see AppHiddenListener
  45  * @see UserSessionListener
  46  * @see ScreenSleepListener
  47  * @see SystemSleepListener
  48  *
  49  * @since 1.4
  50  * @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link QuitResponse}
  51  */
  52 @SuppressWarnings("deprecation")
  53 @Deprecated
  54 public interface ApplicationListener extends EventListener {
  55     /**
  56      * Called when the user selects the About item in the application menu. If <code>event</code> is not handled by
  57      * setting <code>isHandled(true)</code>, a default About window consisting of the application's name and icon is
  58      * displayed. To display a custom About window, designate the <code>event</code> as being handled and display the
  59      * appropriate About window.
  60      *
  61      * @param event an ApplicationEvent initiated by the user choosing About in the application menu
  62      * @deprecated use {@link AboutHandler}
  63      */
  64     @Deprecated
  65     public void handleAbout(ApplicationEvent event);
  66 
  67     /**
  68      * Called when the application receives an Open Application event from the Finder or another application. Usually
  69      * this will come from the Finder when a user double-clicks your application icon. If there is any special code
  70      * that you want to run when you user launches your application from the Finder or by sending an Open Application


 117      * These events are sent only if the bound application has file types listed in the Info.plist entries Document Types
 118      * or CFBundleDocumentTypes.
 119      *
 120      * The ApplicationEvent sent to this handler holds a reference to the file being opened.
 121      *
 122      * @param event a Print Document event with a reference to the file(s) to be printed
 123      * @deprecated use {@link PrintFilesHandler}
 124      */
 125     @Deprecated
 126     public void handlePrintFile(ApplicationEvent event);
 127 
 128     /**
 129      * Called when the application is sent the Quit event. This event is generated when the user selects Quit from the
 130      * application menu, when the user types Command-Q, or when the user control clicks on your application icon in the
 131      * Dock and chooses Quit. You can either accept or reject the request to quit. You might want to reject the request
 132      * to quit if the user has unsaved work. Reject the request, move into your code to save changes, then quit your
 133      * application. To accept the request to quit, and terminate the application, set <code>isHandled(true)</code> for the
 134      * <code>event</code>. To reject the quit, set <code>isHandled(false)</code>.
 135      *
 136      * @param event a Quit Application event
 137      * @deprecated use {@link QuitHandler} and {@link QuitResponse}
 138      */
 139     @Deprecated
 140     public void handleQuit(ApplicationEvent event);
 141 
 142     /**
 143      * Called when the application receives a Reopen Application event from the Finder or another application. Usually
 144      * this will come when a user clicks on your application icon in the Dock. If there is any special code
 145      * that needs to run when your user clicks on your application icon in the Dock or when a Reopen Application
 146      * event is sent from another application, include that code as part of this handler.
 147      *
 148      * @param event the Reopen Application event
 149      * @deprecated use {@link AppReOpenedListener}
 150      */
 151     @Deprecated
 152     public void handleReOpenApplication(ApplicationEvent event);
 153 }


  30 /**
  31  * ApplicationEvents are deprecated. Use individual AppEvent listeners or handlers instead.
  32  *
  33  * @see Application#addAppEventListener(AppEventListener)
  34  *
  35  * @see AboutHandler
  36  * @see PreferencesHandler
  37  * @see OpenURIHandler
  38  * @see OpenFilesHandler
  39  * @see PrintFilesHandler
  40  * @see QuitHandler
  41  *
  42  * @see AppReOpenedListener
  43  * @see AppForegroundListener
  44  * @see AppHiddenListener
  45  * @see UserSessionListener
  46  * @see ScreenSleepListener
  47  * @see SystemSleepListener
  48  *
  49  * @since 1.4
  50  * @deprecated replaced by {@link AboutHandler}, {@link PreferencesHandler}, {@link AppReOpenedListener}, {@link OpenFilesHandler}, {@link PrintFilesHandler}, {@link QuitHandler}, {@link MacQuitResponse}
  51  */
  52 @SuppressWarnings("deprecation")
  53 @Deprecated
  54 public interface ApplicationListener extends EventListener {
  55     /**
  56      * Called when the user selects the About item in the application menu. If <code>event</code> is not handled by
  57      * setting <code>isHandled(true)</code>, a default About window consisting of the application's name and icon is
  58      * displayed. To display a custom About window, designate the <code>event</code> as being handled and display the
  59      * appropriate About window.
  60      *
  61      * @param event an ApplicationEvent initiated by the user choosing About in the application menu
  62      * @deprecated use {@link AboutHandler}
  63      */
  64     @Deprecated
  65     public void handleAbout(ApplicationEvent event);
  66 
  67     /**
  68      * Called when the application receives an Open Application event from the Finder or another application. Usually
  69      * this will come from the Finder when a user double-clicks your application icon. If there is any special code
  70      * that you want to run when you user launches your application from the Finder or by sending an Open Application


 117      * These events are sent only if the bound application has file types listed in the Info.plist entries Document Types
 118      * or CFBundleDocumentTypes.
 119      *
 120      * The ApplicationEvent sent to this handler holds a reference to the file being opened.
 121      *
 122      * @param event a Print Document event with a reference to the file(s) to be printed
 123      * @deprecated use {@link PrintFilesHandler}
 124      */
 125     @Deprecated
 126     public void handlePrintFile(ApplicationEvent event);
 127 
 128     /**
 129      * Called when the application is sent the Quit event. This event is generated when the user selects Quit from the
 130      * application menu, when the user types Command-Q, or when the user control clicks on your application icon in the
 131      * Dock and chooses Quit. You can either accept or reject the request to quit. You might want to reject the request
 132      * to quit if the user has unsaved work. Reject the request, move into your code to save changes, then quit your
 133      * application. To accept the request to quit, and terminate the application, set <code>isHandled(true)</code> for the
 134      * <code>event</code>. To reject the quit, set <code>isHandled(false)</code>.
 135      *
 136      * @param event a Quit Application event
 137      * @deprecated use {@link QuitHandler} and {@link MacQuitResponse}
 138      */
 139     @Deprecated
 140     public void handleQuit(ApplicationEvent event);
 141 
 142     /**
 143      * Called when the application receives a Reopen Application event from the Finder or another application. Usually
 144      * this will come when a user clicks on your application icon in the Dock. If there is any special code
 145      * that needs to run when your user clicks on your application icon in the Dock or when a Reopen Application
 146      * event is sent from another application, include that code as part of this handler.
 147      *
 148      * @param event the Reopen Application event
 149      * @deprecated use {@link AppReOpenedListener}
 150      */
 151     @Deprecated
 152     public void handleReOpenApplication(ApplicationEvent event);
 153 }
< prev index next >