Package com.exe4j
Class Controller
java.lang.Object
com.exe4j.Controller
This class allows you to control the native splash screen of a generated executable from your Java code and register a StartupListener to receive startup events in the single instance mode.
To use this class, please include exe4jlib.jar from your
exe4j installation into your class path. You do not need to distribute this file
along with your application, exe4j will do this automatically for you.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe exception thrown by methods of theControllerclass to indicate that a splash screen operation was not successful.static interfaceThe interface for startup events in single instance mode. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidhide()Programmatically hide the splash screen.static voidregisterStartupListener(Controller.StartupListener startupListener) Register a StartupListener to receive startup events in the single instance mode.static voidwriteMessage(String message) Update the status text line of the native splash screen with a different text.
-
Method Details
-
writeMessage
Update the status text line of the native splash screen with a different text.- Parameters:
message- the new text- Throws:
Controller.ConnectionException- if the call fails
-
hide
Programmatically hide the splash screen. By default, the splash screen will disappear when the first window is shown.- Throws:
Controller.ConnectionException- if the call fails
-
registerStartupListener
Register a StartupListener to receive startup events in the single instance mode. Requests that are already queued will be invoked immediately on the startup listener before this call returns. Later calls will be from different threads.- Parameters:
startupListener- the listener
-