pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gk_br...@verizon.net>
Subject Re: pivot & ui state persistence patterns
Date Mon, 06 Jun 2011 13:52:15 GMT
DesktopApplicationContext simply saves the state of the native frame window. But I'm not sure
what you are asking about. Can you elaborate?
G

On Jun 4, 2011, at 11:16 PM, Andrei Pozolotin wrote:

> Greg, Christopher, Martijn, Noel, Niclas, Sandro, Todd:
> 
> can you guys please share what are best
> pivot ui state persistence patterns?
> 
> DesktopApplicationContext painstakingly goes through 
> 
>                 Preferences preferences = Preferences.userNodeForPackage(DesktopApplicationContext.class);
>                 preferences = preferences.node(applicationClassName);
> 
>                 boolean maximized = (windowedHostFrame.getExtendedState()
>                     & java.awt.Frame.MAXIMIZED_BOTH) == java.awt.Frame.MAXIMIZED_BOTH;
>                 if (!maximized) {
>                     preferences.putInt(X_ARGUMENT, windowedHostFrame.getX());
>                     preferences.putInt(Y_ARGUMENT, windowedHostFrame.getY());
>                     preferences.putInt(WIDTH_ARGUMENT, windowedHostFrame.getWidth());
>                     preferences.putInt(HEIGHT_ARGUMENT, windowedHostFrame.getHeight());
>                 }
> 
> and BXMLSerializer just gives up:
>     @Override
>     public void writeObject(Object object, OutputStream outputStream) throws IOException,
>         SerializationException {
>         throw new UnsupportedOperationException();
>     }
> 
> Thank you, 
> 
> Andrei
> 

_____
Big Life: It's What You Make Itâ„¢




Mime
View raw message