Re: Development Space for GUI stuff?
Peter Donald <peter-4lf8KW9E9MLMqX/[email protected]> Wed, 11 Jun 2003 20:39:13 +1000
| Newsgroups | gmane.comp.java.spice.devel |
|---|---|
| Message-ID | <[email protected]> |
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. 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.
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?
--
Cheers,
Peter Donald
---------------------------------------------------------
Clarke's Third Law: "Any technology distinguishable from
magic is insufficiently advanced".
---------------------------------------------------------
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.