Class MacUtils

java.lang.Object
org.pepsoft.util.MacUtils

public class MacUtils extends Object
Utility methods for integrating into the Mac OS X desktop environment. Created by pepijn on 16-04-15.
  • Method Details

    • installQuitHandler

      public static boolean installQuitHandler(MacUtils.QuitHandler quitHandler)
      When the user requests to quit the application, invokes the specified handler on the event dispatch thread and allows the quit to proceed if it returns true or cancels it otherwise.
      Parameters:
      quitHandler - The handler to invoke.
      Returns:
      true if the handler was successfully installed; false if the Apple Java extensions cannot be found or are too old.
    • installAboutHandler

      public static boolean installAboutHandler(MacUtils.AboutHandler aboutHandler)
      When the user requests to view the About screen, invokes the specified handler on the event dispatch thread.
      Parameters:
      aboutHandler - The handler to invoke.
      Returns:
      true if the handler was successfully installed; false if the Apple Java extensions cannot be found or are too old.
    • installOpenFilesHandler

      public static boolean installOpenFilesHandler(MacUtils.OpenFilesHandler openFilesHandler)
      When the user requests to open (a) file(s) associated with the application, invokes the specified handler on the event dispatch thread.
      Parameters:
      openFilesHandler - The handler to invoke.
      Returns:
      true if the handler was successfully installed; false if the Apple Java extensions cannot be found or are too old.
    • installPreferencesHandler

      public static boolean installPreferencesHandler(MacUtils.PreferencesHandler preferencesHandler)