/hg/icedtea-web: Added splashscreen implementation

jvanek at icedtea.classpath.org jvanek at icedtea.classpath.org
Mon Aug 13 07:53:32 PDT 2012


changeset a86af88a8ecd in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=a86af88a8ecd
author: Jiri Vanek <jvanek at redhat.com>
date: Mon Aug 13 15:52:03 2012 +0200

	Added splashscreen implementation


diffstat:

 ChangeLog                                                                                                    |   88 +
 netx/net/sourceforge/jnlp/GuiLaunchHandler.java                                                              |    2 +-
 netx/net/sourceforge/jnlp/InformationDesc.java                                                               |   16 +-
 netx/net/sourceforge/jnlp/JNLPSplashScreen.java                                                              |   54 +-
 netx/net/sourceforge/jnlp/resources/Messages.properties                                                      |   24 +
 netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java                                                     |   10 +
 netx/net/sourceforge/jnlp/runtime/Boot.java                                                                  |    4 +-
 netx/net/sourceforge/jnlp/splashscreen/SplashController.java                                                 |   48 +
 netx/net/sourceforge/jnlp/splashscreen/SplashErrorPanel.java                                                 |   47 +
 netx/net/sourceforge/jnlp/splashscreen/SplashPanel.java                                                      |  115 ++
 netx/net/sourceforge/jnlp/splashscreen/SplashUtils.java                                                      |  212 +++
 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultErrorSplashScreen2012.java                               |  118 ++
 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreen2012.java                                    |  105 +
 netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java                            |  119 ++
 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainter.java                        |  540 ++++++++++
 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ControlCurve.java                       |  190 +++
 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/Cubic.java                              |   63 +
 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ErrorPainter.java                       |  260 ++++
 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/MovingText.java                         |   77 +
 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubic.java                           |  127 ++
 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicClosed.java                     |  107 +
 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefs.java                        |  198 +++
 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextOutlineRenderer.java                |  152 ++
 netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextWithWaterLevel.java                 |  179 +++
 netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreen.java                            |   85 +
 netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentSplashScreen.java                                 |  156 ++
 netx/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItem.java                                        |  126 ++
 netx/net/sourceforge/jnlp/splashscreen/parts/InfoItem.java                                                   |  145 ++
 netx/net/sourceforge/jnlp/splashscreen/parts/InformationElement.java                                         |  214 +++
 netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java                            |  357 ++++++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/ErrorSplashScreenTest.java                                 |  167 +++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/ErrorSplashUtilsTest.java                                  |  213 +++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/SplashScreenTest.java                                      |  185 +++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/SplashUtilsTest.java                                       |  253 ++++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainterTest.java         |  108 ++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ControlCurveTest.java        |  307 +++++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/CubicTest.java               |   57 +
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ErrorPainterTest.java        |  113 ++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/MovingTextTest.java          |  151 ++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicClosedTest.java      |  264 ++++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicTest.java            |  264 ++++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefsTest.java         |   91 +
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextOutlineRendererTest.java |  127 ++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextWithWaterLevelTest.java  |  131 ++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreenTest.java             |  127 ++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/BasicComponentSplashScreenTest.java                  |  118 ++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItemTest.java                         |  138 ++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/InfoItemTest.java                                    |  111 ++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/InformationElementTest.java                          |  279 +++++
 tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialogTest.java             |  190 +++
 50 files changed, 7321 insertions(+), 11 deletions(-)

diffs (truncated from 7610 to 500 lines):

diff -r 952ee5bb0bf1 -r a86af88a8ecd ChangeLog
--- a/ChangeLog	Mon Aug 13 15:42:03 2012 +0200
+++ b/ChangeLog	Mon Aug 13 15:52:03 2012 +0200
@@ -1,3 +1,91 @@
+2012-08-06  Jiri Vanek  <jvanek at redhat.com>
+
+	Added splashscreen implementation
+	* netx/net/sourceforge/jnlp/GuiLaunchHandler.java: calling JNLPSplashScreen
+	constructor with file ratehr then null.
+	* netx/net/sourceforge/jnlp/InformationDesc.java:  ONE_LINE changed from
+	"oneline" to "one-line", added citation why. (getDescriptionStrict) new
+	method returning exact value or null without fall-back.
+	* netx/net/sourceforge/jnlp/JNLPSplashScreen.java: Added header, default
+	values and useless string replaced by JnlpFile.
+	* netx/net/sourceforge/jnlp/resources/Messages.properties: Added SPLASH
+	family of keys.
+	* netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java: (getSplashControler)
+	new method returning its SplashControler.
+	* netx/net/sourceforge/jnlp/runtime/Boot.java: Constants (name) and
+	(version) made public.
+	* netx/net/sourceforge/jnlp/splashscreen/SplashController.java: New interface
+	for each class which wants its splasshcreen controlled by SplashUtils.
+	* netx/net/sourceforge/jnlp/splashscreen/SplashErrorPanel.java: New interface
+	for each class which wants to serve as error-showing splashscreen.
+	* netx/net/sourceforge/jnlp/splashscreen/SplashPanel.java:  New interface
+	for each class which wants to serve as splashscreen.
+	* netx/net/sourceforge/jnlp/splashscreen/SplashUtils.java: Factory methods
+	for simplified splashscreens creation.
+	* netx/net/sourceforge/jnlp/splashscreen/impls/DefaultErrorSplashScreen2012.java:
+	Full implementation of SplashErrorPanel to be used as default error 
+	splashscreen.
+	* netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreen2012.java:
+	Full implementation of SplashPanel to be used as default splashscreen.
+	* netx/net/sourceforge/jnlp/splashscreen/impls/DefaultSplashScreens2012Commons.java:
+	Class for gathering same logic in DefaultErrorSplashScreen2012 and
+	DefaultSplashScreen2012.
+	* netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainter.java:
+	Class responsible for paint main graphic in DefaultSplashScreen2012.
+	* netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ControlCurve.java:
+	Painting forefather for primitives drawing curves.
+	* netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/Cubic.java:
+	Class with cubic calculation.
+	* netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ErrorPainter.java:
+	Class responsible for paint main graphic in DefaultErrorSplashScreen2012.
+	* netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/MovingText.java:
+	Class responsible for metal-shining web label.
+	* netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubic.java:
+	Painting primitive for drawing cubic-splines.
+	* netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicClosed.java:
+	Painting primitive for drawing self-closed cubic-splines.
+	* netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextOutlineRenderer.java:
+	Class for rendering text from given texture,
+	* netx/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextWithWaterLevel.java:
+	Class for rendering Iced label slowly filled with watter
+	* netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreen.java:
+	Common forefather for all error splashscreens which would like to be an
+	component too.
+	* netx/net/sourceforge/jnlp/splashscreen/parts/BasicComponentSplashScreen.java:
+	Common forefather for all splashscreens which would like to be an component too.
+	* netx/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItem.java:
+	Description item of InformationElement
+	* netx/net/sourceforge/jnlp/splashscreen/parts/InfoItem.java:
+	Individual items in InformationElement
+	* netx/net/sourceforge/jnlp/splashscreen/parts/InformationElement.java:
+	Wrapper around jnlp's information element.
+	* netx/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialog.java:
+	Custom error dialogue with direct access to exception and icedtea-web page
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/ErrorSplashScreenTest.java:
+	Test for final composition of ErrorSplashScreen2012, including main method
+	for manual testing
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/SplashScreenTest.java:
+	Test for final composition of SplashScreen2012, including main method
+	for manual testing
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/ErrorSplashUtilsTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/BasePainterTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ControlCurveTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/CubicTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/ErrorPainterTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/MovingTextTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicClosedTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/NatCubicTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/SplinesDefsTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextOutlineRendererTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/impls/defaultsplashscreen2012/TextWithWaterLevelTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/BasicComponentErrorSplashScreenTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/BasicComponentSplashScreenTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/DescriptionInfoItemTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/InfoItemTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/InformationElementTest.java:
+	* tests/netx/unit/net/sourceforge/jnlp/splashscreen/parts/JEditorPaneBasedExceptionDialogTest.java:
+	Unit-test classes always testing the class with corresponding name
+
 2012-08-13  Jiri Vanek  <jvanek at redhat.com>
 
 	* tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java:
diff -r 952ee5bb0bf1 -r a86af88a8ecd netx/net/sourceforge/jnlp/GuiLaunchHandler.java
--- a/netx/net/sourceforge/jnlp/GuiLaunchHandler.java	Mon Aug 13 15:42:03 2012 +0200
+++ b/netx/net/sourceforge/jnlp/GuiLaunchHandler.java	Mon Aug 13 15:52:03 2012 +0200
@@ -117,7 +117,7 @@
                     SwingUtilities.invokeAndWait(new Runnable() {
                         @Override
                         public void run() {
-                            splashScreen = new JNLPSplashScreen(resourceTracker, null, null);
+                            splashScreen = new JNLPSplashScreen(resourceTracker, file);
                         }
                     });
                 } catch (InterruptedException ie) {
diff -r 952ee5bb0bf1 -r a86af88a8ecd netx/net/sourceforge/jnlp/InformationDesc.java
--- a/netx/net/sourceforge/jnlp/InformationDesc.java	Mon Aug 13 15:42:03 2012 +0200
+++ b/netx/net/sourceforge/jnlp/InformationDesc.java	Mon Aug 13 15:52:03 2012 +0200
@@ -34,7 +34,8 @@
     // specification name.
 
     /** one-line description */
-    public static final Object ONE_LINE = "oneline";
+    /**http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html**/
+    public static final Object ONE_LINE = "one-line";
 
     /** short description */
     public static final Object SHORT = "short";
@@ -110,13 +111,24 @@
      * Information.TOOLTIP, Information.DEFAULT
      */
     public String getDescription(Object kind) {
-        String result = (String) getItem("description-" + kind);
+        String result = getDescriptionStrict(kind);
         if (result == null)
             return (String) getItem("description-" + DEFAULT);
         else
             return result;
     }
 
+      /**
+     * Returns the application's description of the specified type.
+     *
+     * @param kind one of Information.SHORT, Information.ONE_LINE,
+     * Information.TOOLTIP, Information.DEFAULT
+     */
+    public String getDescriptionStrict(Object kind) {
+        return (String) getItem("description-" + kind);
+        
+    }
+
     /**
      * Returns the icons specified by the JNLP file.
      *
diff -r 952ee5bb0bf1 -r a86af88a8ecd netx/net/sourceforge/jnlp/JNLPSplashScreen.java
--- a/netx/net/sourceforge/jnlp/JNLPSplashScreen.java	Mon Aug 13 15:42:03 2012 +0200
+++ b/netx/net/sourceforge/jnlp/JNLPSplashScreen.java	Mon Aug 13 15:52:03 2012 +0200
@@ -1,5 +1,43 @@
+/* JNLPSplashScreen.java
+   Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
 package net.sourceforge.jnlp;
 
+import java.awt.BorderLayout;
 import java.awt.Dimension;
 import java.awt.Graphics;
 import java.awt.Graphics2D;
@@ -15,19 +53,23 @@
 import net.sourceforge.jnlp.cache.ResourceTracker;
 import net.sourceforge.jnlp.runtime.JNLPRuntime;
 import net.sourceforge.jnlp.util.ImageResources;
+import net.sourceforge.jnlp.splashscreen.SplashPanel;
+import net.sourceforge.jnlp.splashscreen.SplashUtils;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
 
 public class JNLPSplashScreen extends JDialog {
 
-    String applicationTitle;
-    String applicationVendor;
 
     ResourceTracker resourceTracker;
 
     URL splashImageUrl;
     Image splashImage;
+    private final JNLPFile file;
+    public static final  int DEF_WIDTH=635;
+    public static final  int DEF_HEIGHT=480;
+    private SplashPanel componetSplash;
 
-    public JNLPSplashScreen(ResourceTracker resourceTracker,
-            String applicationTitle, String applicationVendor) {
+    public JNLPSplashScreen(ResourceTracker resourceTracker, final JNLPFile file) {
 
         setIconImages(ImageResources.INSTANCE.getApplicationImages());
 
@@ -36,8 +78,8 @@
         // JNLP file.
 
         this.resourceTracker = resourceTracker;
-        this.applicationTitle = applicationTitle;
-        this.applicationVendor = applicationVendor;
+
+        this.file=file;    
 
     }
 
diff -r 952ee5bb0bf1 -r a86af88a8ecd netx/net/sourceforge/jnlp/resources/Messages.properties
--- a/netx/net/sourceforge/jnlp/resources/Messages.properties	Mon Aug 13 15:42:03 2012 +0200
+++ b/netx/net/sourceforge/jnlp/resources/Messages.properties	Mon Aug 13 15:52:03 2012 +0200
@@ -440,3 +440,27 @@
 CLInfoDescription=Shows more information about the given property
 CLCheckDescription=Shows any properties that have been defined but are not recognized by IcedTea Web
 CLHelpDescription=The itweb-settings tool allows a user to modify, view and check configuration. \nTo use the GUI, do not pass any arguments. To use the CLI mode, pass in the approrpiate command and parameters. For help with a particular command, try: {0} command help
+
+#  splash screen related
+SPLASHerror = Click here for details. Serious exception occurred.
+SPLASH_ERROR = ERROR
+SPLASHtitle = Title
+SPLASHvendor = Vendor
+SPLASHhomepage = Homepage
+SPLASHdescription = Description
+SPLASHClose= Close
+SPLASHclosewAndCopyException = Close and copy StackTrace to clipboard
+SPLASHexOccured = Sorry, an serious exception have occurred...
+SPLASHHome = Home
+SPLASHcantCopyEx = Can not copy exception
+SPLASHnoExRecorded = No exception recorded
+SPLASHmainL1 = For even more  information you can visit {0} and follow the steps to obtain information and fill bug
+SPLASHurl = http://icedtea.classpath.org/wiki/IcedTea-Web#Filing_bugs
+SPLASHurlLooks = http://icedtea.classpath.org/wiki/IcedTea-Web
+SPLASHmainL3 = Sorry no more information available, try to launch browser from command line and watch output.
+SPLASHcloseAndCopyShorter = Close and copy to clipboard
+SPLASHmainL4 = We have noticed exception written below, for even more information try to launch browser from command line and watch output
+SPLASHexWas = Exception was:
+SPLASHcfl = Can't follow link to
+SPLASHvendorsInfo = Information from vendor of your application
+SPLASHanotherInfo = Another available info
diff -r 952ee5bb0bf1 -r a86af88a8ecd netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java
--- a/netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java	Mon Aug 13 15:42:03 2012 +0200
+++ b/netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java	Mon Aug 13 15:52:03 2012 +0200
@@ -27,6 +27,7 @@
 import javax.swing.*;
 
 import net.sourceforge.jnlp.*;
+import net.sourceforge.jnlp.splashscreen.SplashController;
 import net.sourceforge.jnlp.util.*;
 
 /**
@@ -130,6 +131,15 @@
         return cont;
     }
 
+     /**
+     * container must be SplashContoler
+     * 
+     */
+    public SplashController getSplashControler() {
+        
+        return (SplashController)cont;
+    }
+
     /**
      * Initialize, start, and show the applet.
      */
diff -r 952ee5bb0bf1 -r a86af88a8ecd netx/net/sourceforge/jnlp/runtime/Boot.java
--- a/netx/net/sourceforge/jnlp/runtime/Boot.java	Mon Aug 13 15:42:03 2012 +0200
+++ b/netx/net/sourceforge/jnlp/runtime/Boot.java	Mon Aug 13 15:52:03 2012 +0200
@@ -53,8 +53,8 @@
     // todo: decide whether a spawned netx (external launch)
     // should inherit the same options as this instance (store argv?)
 
-    private static final String name = Boot.class.getPackage().getImplementationTitle();
-    private static final String version = Boot.class.getPackage().getImplementationVersion();
+    public static final String name = Boot.class.getPackage().getImplementationTitle();
+    public static final String version = Boot.class.getPackage().getImplementationVersion();
 
     /** the text to display before launching the about link */
     private static final String aboutMessage = ""
diff -r 952ee5bb0bf1 -r a86af88a8ecd netx/net/sourceforge/jnlp/splashscreen/SplashController.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/SplashController.java	Mon Aug 13 15:52:03 2012 +0200
@@ -0,0 +1,48 @@
+/* SplashController.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+public interface SplashController {
+
+    public void removeSplash();
+
+    public void replaceSplash(SplashPanel r);
+
+    public int getSplashWidth();
+
+    public int getSplashHeigth();
+}
diff -r 952ee5bb0bf1 -r a86af88a8ecd netx/net/sourceforge/jnlp/splashscreen/SplashErrorPanel.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/SplashErrorPanel.java	Mon Aug 13 15:52:03 2012 +0200
@@ -0,0 +1,47 @@
+/* SplashErrorPanel.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+public interface SplashErrorPanel extends SplashPanel {
+
+    /**
+     * When applet loading fails, then dying stacktrace can be set, and is then shown to user on demand.
+     */
+    public Throwable getLoadingException();
+
+    public void setLoadingException(Throwable loadingException);
+}
diff -r 952ee5bb0bf1 -r a86af88a8ecd netx/net/sourceforge/jnlp/splashscreen/SplashPanel.java
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/netx/net/sourceforge/jnlp/splashscreen/SplashPanel.java	Mon Aug 13 15:52:03 2012 +0200
@@ -0,0 +1,115 @@
+/* SplashPanel.java
+Copyright (C) 2012 Red Hat, Inc.
+
+This file is part of IcedTea.
+
+IcedTea is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+IcedTea is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with IcedTea; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+package net.sourceforge.jnlp.splashscreen;
+
+import java.awt.Graphics;
+import java.awt.event.ComponentListener;
+
+import javax.swing.JComponent;
+import net.sourceforge.jnlp.splashscreen.SplashUtils.SplashReason;
+import net.sourceforge.jnlp.splashscreen.parts.InformationElement;
+
+public interface SplashPanel {
+
+    /**
+     * The plugin splashscreens must be placed into another containers,
+     * So must return themselves as JComponent.
+     * Mostly your SplashScreen will extend some JComponent, so this method will
+     * just return "this"
+     */
+    public JComponent getSplashComponent();
+
+  
+    public void setInformationElement(InformationElement content);
+
+    public InformationElement getInformationElement();
+
+    /** Width of the plugin window */
+    public void setSplashWidth(int pluginWidth);
+
+    /** Height of the plugin window */
+    public void setSplashHeight(int pluginHeight);
+
+    /** Width of the plugin window */
+    public int getSplashWidth();
+
+    /** Height of the plugin window */
+    public int getSplashHeight();
+
+    public void adjustForSize();
+
+    // Add a new listener for resizes
+    public void addComponentListener(ComponentListener cl);
+
+    public boolean isAnimationRunning();
+
+    /**
+     * Methods to start the animation in the splash panel.
+     *
+     * This method exits after starting a new thread to do the animation. It
+     * is synchronized to prevent multiple startAnimation threads from being created.
+     */
+    public void startAnimation();
+
+    public void stopAnimation();
+



More information about the distro-pkg-dev mailing list