Interface ApplicationMenuListener
public interface ApplicationMenuListener
Interface for receiving events from the macOS application menu. Once
a listener has been registered using
MacIntegration.setApplicationMenuListener(ApplicationMenuListener)
they are notified whenever a menu item in the application menu is clicked.-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanWhen true, this will show the "Preferences" entry as part of the application menu.voidonAbout()Called when the "About" application menu item is clicked.default voidCalled when the "Preferences" application menu item (if available) is clicked.voidonQuit()Called when the "Quit" application menu item is clicked.
-
Method Details
-
onQuit
void onQuit()Called when the "Quit" application menu item is clicked. This method is invoked right before the application exits. -
onAbout
void onAbout()Called when the "About" application menu item is clicked. -
hasPreferencesMenu
default boolean hasPreferencesMenu()When true, this will show the "Preferences" entry as part of the application menu. If this returns false, the preferences will be hidden, meaning thatonPreferences()is inaccessible. -
onPreferences
default void onPreferences()Called when the "Preferences" application menu item (if available) is clicked. This method is never used ifhasPreferencesMenu()returns false.
-