Package org.rapidcontext.app.ui
Class MacApplication
java.lang.Object
org.rapidcontext.app.ui.MacApplication
A Mac application wrapper. This class is used to avoid a direct
dependency on the Apple-specific AWT classes used on the Mac.
Instead, all calls to this class are forwarded via reflection to
the real application handler. This avoids ClassNotFoundException
when loading this class on other environments.
- Version:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic MacApplication
get()
Returns the Mac application wrapper instance.void
setAboutHandler
(ActionListener listener) Sets an about handler for the application.void
setDockIconImage
(Image image) Sets the dock icon image for the application.void
setPreferencesHandler
(ActionListener listener) Sets a preferences handler for the application.
-
Method Details
-
get
Returns the Mac application wrapper instance.- Returns:
- the Mac application wrapper instance
- Throws:
Exception
- if the Apple-specific classes weren't found
-
setDockIconImage
Sets the dock icon image for the application.- Parameters:
image
- the image to use- Throws:
Exception
- if the image couldn't be added
-
setAboutHandler
Sets an about handler for the application.- Parameters:
listener
- the handler to use, or null for default- Throws:
Exception
- if the handler couldn't be added
-
setPreferencesHandler
Sets a preferences handler for the application.- Parameters:
listener
- the handler to use, or null for none- Throws:
Exception
- if the handler couldn't be added
-