/**
* Attempt to restore the docking layout
*/
public void loadLayout( InputStream is )
{
MultiSplitLayout multiSplitLayout = multiSplitPane.getMultiSplitLayout();
try {
XMLDecoder d = new XMLDecoder(new BufferedInputStream( is ));
MultiSplitLayout.Node model = (MultiSplitLayout.Node)( d.readObject());
multiSplitLayout.setModel( model );
multiSplitLayout.setFloatingDividers( false );
d.close();
// trick is used to restore the size of the example window
multiSplitPane.setPreferredSize( model.getBounds().getSize());
dockHiddenChildren();
}
catch (Exception exc) {
MultiSplitLayout.Node model = MultiSplitLayout.parseModel( defaultLayoutDef );
multiSplitLayout.setModel( model );
}
}