|
From: Thoralf R. <th...@m8...> - 2007-11-30 14:53:26
|
Hi! First of all: Nice work! We use the docking framework for a small tool and it's so easy... Thanks. Some time ago I thought, that the IDF way of serializing the settings is a little bit unusual for Java. Using a ObjectStream makes it impossible to find out, what's going on. I wrote my own Serializer/Deserializer that uses XML output/input. If you want, you can have a look at it. It's splitted into -more or less- two classes. DockingLayout: <http://magellan-client.svn.sourceforge.net/viewvc/magellan-client/trunk/magellan2/src-client/magellan/client/desktop/DockingLayout.java?view=markup&pathrev=600> DockingLayoutBuilder: <http://magellan-client.svn.sourceforge.net/viewvc/magellan-client/trunk/magellan2/src-client/magellan/client/desktop/DockingFrameworkBuilder.java?view=markup&pathrev=600> It supports loading and saving of multiple "layouts". The user can switch between the dock settings at runtime. Maybe some settings (window bar) are not saved correctly, but that is "trivial". You have to call DockingLayoutBuilder.createRootWindow(components,file) to load the settings and DockingLayoutBuilder.write(file) to save them. You can switch the layout by calling setActiveLayout(DockingLayout). Actually this is a part of a bigger project and it cannot be used standalone. But if you wish, you can use this as a starting point for your own implementation. If the IDF developers decide to use this "algorith", please let me know (for my "self-confidence"). I'm not a member of this list. So, if you want to reply to my message, please add my email adress to your answer. Thank! bye Thoralf PS: Thanks to the list moderator to reject my post manually without reason........ |