Re: Development Space for GUI stuff?
Mauro Talevi <[email protected]> Thu, 12 Jun 2003 19:03:53 +0100
| Newsgroups | gmane.comp.java.spice.devel |
|---|---|
| Message-ID | <[email protected]> |
Peter Donald wrote: > Anyways the first toolkit I was wanting to do is an "action manager" that read > in a XML descriptor to build a bunch of Actions. exteca.client.gui has an action manager along these lines (but no XML support). ATM all is static but can easily be changed to create an instance per xml descriptor. Something like > > <action-defs> > > <action-list name="file.menu"> > <action name="new" > displayString="New" > mnemonic="N" > icon="newButton.gif" > description="Create a new File"/> > <action name="open" > displayString="Open" > mnemonic="S" > icon="openButton.gif" > description="Open a File"/> > </action-list> > > </action-defs> > > This would create a bunch of Swing Action objects. You could then turn these > Action trees into menus (either popup or not), toolbars and other similar > buttong lists stuff. yep - nice idea. > You would do something like > > ActionManager actions = ActionManager.create( "mdeflist.xml" ); > Action action = actions.get( "new" ); > ... > > actions.wireHandler( "new", someRealHandler ); > > ActionUIFactory factory = ...; > > factory.createToolBar( actions, "file.menu" ); > factory.createMenu( actions, "file.menu" ); > factory.createPopupMenu( actions, "file.menu" ); > > Thoughts? > sound good to me! I will revisit my code and start throwing some ideas around. ------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5