aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net/sourceforge/jnlp/LaunchHandler.java
diff options
context:
space:
mode:
authorOmair Majid <[email protected]>2011-03-30 11:47:41 -0400
committerOmair Majid <[email protected]>2011-03-30 11:47:41 -0400
commite10781541da8ef982080b5b0c2ed3e8ced6f47d4 (patch)
treed5fabfafa62176b343749e5460d7a726be5ab58b /netx/net/sourceforge/jnlp/LaunchHandler.java
parent8f8099cbfacfcd8066e4b4622fd208cec5e82792 (diff)
Add a new LaunchHandler to show error messages when starting applications
This LaunchHandler is only used when not running in headless mode. This launchHandler is also responsible for showing the splash screen. 2011-03-30 Omair Majid <[email protected]> * netx/net/sourceforge/jnlp/LaunchHandler.java (launchInitialized, launchStarting): New methods. * netx/net/sourceforge/jnlp/DefaultLaunchHandler.java (launchInitialized, launchStarting): New methods. No-op implementation. (printMessage): Make it static. * netx/net/sourceforge/jnlp/GuiLaunchHandler.java: New file. (launchCompleted, launchError, launchStarting, launchInitialized), (launchWarning, validationError): New methods. * netx/net/sourceforge/jnlp/Launcher.java (launchApplication): Invoke handler.launchInitialized and handler.launchStarting instead of showing a splash screen directly. * netx/net/sourceforge/jnlp/resources/Messages.properties: Add ButShowDetails, ButHideDetails and Error. * netx/net/sourceforge/jnlp/runtime/Boot.java (run): Do not exit on error. * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): Set handler to GuiLaunchHandler if not running in headless mode. * netx/net/sourceforge/jnlp/util/BasicExceptionDialog.java: New file. (exceptionToString, show): New methods.
Diffstat (limited to 'netx/net/sourceforge/jnlp/LaunchHandler.java')
-rw-r--r--netx/net/sourceforge/jnlp/LaunchHandler.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/netx/net/sourceforge/jnlp/LaunchHandler.java b/netx/net/sourceforge/jnlp/LaunchHandler.java
index a0b106b..f12dcf6 100644
--- a/netx/net/sourceforge/jnlp/LaunchHandler.java
+++ b/netx/net/sourceforge/jnlp/LaunchHandler.java
@@ -56,6 +56,24 @@ public interface LaunchHandler {
// controller is in place.
/**
+ * Called when an application, applet or installer has been determined.
+ * We have some very basic information about the application at this point,
+ * but do not have everything required. This is a nice point to show the
+ * splash screen.
+ *
+ * @param application the application instance that is starting
+ */
+ public void launchInitialized(JNLPFile file);
+
+ /**
+ * Called when an application, applet or installer is ready to start.
+ * Good point to hide the splash screen.
+ *
+ * @param application the application instance that is ready
+ */
+ public void launchStarting(ApplicationInstance application);
+
+ /**
* Called when an application, applet, or installer has been
* launched successfully (the main method or applet start method
* returned normally).