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â„¢



Reply via email to