Might a --maximized=true argument be sufficient? On Apr 14, 2010, at 3:12 PM, [email protected] 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/%[email protected]%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
