Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: None
    • Labels:
      None

      Description

      I've tried to get hold of the SplashScreen that I've defined in my manifest.mf file:

      >Manifest-Version: 1.0
      >X-COMMENT: Main-Class will be added automatically by build
      >SplashScreen-Image: com/macad/enbal/resources/welcome.jpg

      But once the DesktopApplicationContext takes over, it is impossible to get the SplashScreen (null pointer exception is thrown).

      Could you extend the API so that we can show the SplashScreen, and close it once all the init actions have been finished just before we open the application window as the nameless gray pivot window is displayed quite a long time.

      1. SplashScreenTest.zip
        28 kB
        Chris Bartlett
      2. SplashScreenTest.launch
        1 kB
        Sandro Martini
      3. splash_screen.patch
        5 kB
        Chris Bartlett

        Activity

        Hide
        Sandro Martini added a comment -

        Resolved, in case of problems be free to reopen the issue.

        Show
        Sandro Martini added a comment - Resolved, in case of problems be free to reopen the issue.
        Hide
        Sandro Martini added a comment -

        Add eclipse launch test file

        Show
        Sandro Martini added a comment - Add eclipse launch test file
        Hide
        Sandro Martini added a comment -

        The fix from Chris is great, and doesn't require api changes, so moved to 2.0.1 .
        In the commit I will change only a little some details.

        Show
        Sandro Martini added a comment - The fix from Chris is great, and doesn't require api changes, so moved to 2.0.1 . In the commit I will change only a little some details.
        Hide
        Chris Bartlett added a comment -

        Test application to go with the most recent patch

        Show
        Chris Bartlett added a comment - Test application to go with the most recent patch
        Hide
        Chris Bartlett added a comment -

        Updated patch that works with full screen and regular desktop applications

        Show
        Chris Bartlett added a comment - Updated patch that works with full screen and regular desktop applications
        Hide
        Chris Bartlett added a comment -

        I do intend to attach a simple test app, but haven't had time yet.

        Show
        Chris Bartlett added a comment - I do intend to attach a simple test app, but haven't had time yet.
        Hide
        Sandro Martini added a comment -

        Hi Chris,
        the patch to me seem Ok (but I haven't tried with a minimal application).
        Only one thing: have you got some time to put under the tests subproject a minimal test, so we can simply (and fast) test now (and re-test later if/when needed) ?

        So after this (if there aren't objections) I think it's safe to commit and resolve even in 2.0.1 release.

        Bye

        Show
        Sandro Martini added a comment - Hi Chris, the patch to me seem Ok (but I haven't tried with a minimal application). Only one thing: have you got some time to put under the tests subproject a minimal test, so we can simply (and fast) test now (and re-test later if/when needed) ? So after this (if there aren't objections) I think it's safe to commit and resolve even in 2.0.1 release. Bye
        Hide
        Chris Bartlett added a comment -

        Patch as described in previous comment

        Show
        Chris Bartlett added a comment - Patch as described in previous comment
        Hide
        Chris Bartlett added a comment -

        I must have missed this ticket, but recently implemented something similar via a new startup property for DesktopApplicationContext (--preserveSplashScreen=true)

        The host frame will not be made visible if all 3 conditions are met

        • the 'preserveSplashScreen' property is set
        • its value is 'true'
        • java.awt.SplashScreen.getSplashScreen() != null

        The host frame can be made visible later using something like ...
        // Display from Application#startup(Display, Map<String,String>)
        java.awt.Window window = display.getHostWindow();
        // Making the host frame visible will close the SplashScreen.
        window.setVisible(true);
        window.toFront();

        See
        http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/DesktopApplicationContext.html#setFullScreen(boolean)
        http://download.oracle.com/javase/6/docs/api/java/awt/SplashScreen.html#getSplashScreen()

        I can submit a patch when I'm back at my dev machine tomorrow.

        Show
        Chris Bartlett added a comment - I must have missed this ticket, but recently implemented something similar via a new startup property for DesktopApplicationContext (--preserveSplashScreen=true) The host frame will not be made visible if all 3 conditions are met the 'preserveSplashScreen' property is set its value is 'true' java.awt.SplashScreen.getSplashScreen() != null The host frame can be made visible later using something like ... // Display from Application#startup(Display, Map<String,String>) java.awt.Window window = display.getHostWindow(); // Making the host frame visible will close the SplashScreen. window.setVisible(true); window.toFront(); See http://pivot.apache.org/2.0/docs/api/org/apache/pivot/wtk/DesktopApplicationContext.html#setFullScreen(boolean ) http://download.oracle.com/javase/6/docs/api/java/awt/SplashScreen.html#getSplashScreen( ) I can submit a patch when I'm back at my dev machine tomorrow.

          People

          • Assignee:
            Chris Bartlett
            Reporter:
            Bojan Vucinic
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development