[ 
https://issues.apache.org/jira/browse/PIVOT-700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070735#comment-13070735
 ] 

Chris Bartlett commented on PIVOT-700:
--------------------------------------

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.


> SplashScreen control
> --------------------
>
>                 Key: PIVOT-700
>                 URL: https://issues.apache.org/jira/browse/PIVOT-700
>             Project: Pivot
>          Issue Type: New Feature
>    Affects Versions: 2.0
>            Reporter: Bojan Vucinic
>             Fix For: 2.1
>
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to