pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <alejandro.vi...@synacom.com.bo>
Subject RE: Setting the initial window state in a Desktop App
Date Thu, 15 Apr 2010 00:12:20 GMT
Hi Greg,  I agree with you,… so this argument will be included? There a way
that I can to help on this?

 

Thanks

-a

 

From: Greg Brown [mailto:gkbrown@mac.com] 
Sent: Miércoles, 14 de Abril de 2010 04:05 p.m.
To: user@pivot.apache.org
Subject: Re: Setting the initial window state in a Desktop App

 

Might a --maximized=true argument be sufficient?

 

On Apr 14, 2010, at 3:12 PM, alejandro.vilar@synacom.com.bo wrote:





Hi,

                I’m developing a Desktop app, and I want start my app in a
particular state(e.g. maximized), searching on the mailing list I found this
thread:

http://mail-archives.apache.org/mod_mbox//incubator-pivot-user/200906.mbox/%
3CDD124263-D8F1-4C8D-BC35-00765DAB36D9@mac.com%3E
<http://mail-archives.apache.org/mod_mbox/incubator-pivot-user/200906.mbox/%
3CDD124263-D8F1-4C8D-BC35-00765DAB36D9@mac.com%3E> 

 

There is no way to start a window(AWT) in a particular state in Pivot’s
current version?

 

Looking in the code I found the DesktopApplicationContext class where the
hostFrame(AWT frame) properties are assigned, there are some arguments such
as CENTER_ARGUMENT, RESIZABLE_ARGUMENT, FULL_SCREEN_ARGUMENT and so on…
Then, it would be possible to add an extra argument as "initial state" to
allow the application start with that state?

 

For example (DesktopApplicationContext.java):

...

private static final String FULL_SCREEN_ARGUMENT = "fullScreen";

private static final String INITIAL_STATE_ARGUMENT = "initialState";

…

boolean fullScreen = false;

int initialState = 0; //Normal Frame State

…

else if (key.equals(FULL_SCREEN_ARGUMENT)) {

fullScreen = Boolean.parseBoolean(value);

} else if (key.equals(INITIAL_STATE_ARGUMENT)) {

initialState = Integer.parseInt(value);

}

…..

windowedHostFrame.setExtendedState(initialState);

 

 

and use something like(e.g. maximized):  --initialState=6
 

 

Cheers,

Alejandro

 


Mime
View raw message