Skip to main content

Source code browse

Revision: 410

Release 1.1.43
» Project Revision History

» Checkout URL

svn / trunk

FilenameAuthorRevisionModifiedLog Entry
pietschy 381 over 10 years ago udpate change history
pietschy 4 almost 13 years ago Initial upload of GUI-Commands I...
pietschy 337 about 11 years ago no message
pietschy 409 over 9 years ago Updated to reflect the release o...
pietschy 286 over 11 years ago Issue number: Obtained from: Sub...
pietschy 310 over 11 years ago Issue number: Obtained from: Sub...
pietschy 116 over 12 years ago no message
pietschy 408 over 9 years ago Updated to reflect the release o...
pietschy 358 almost 11 years ago big lazy checkin..
pietschy 368 almost 11 years ago release 1.1.42
pietschy 395 over 9 years ago Adding delegate updates, minor c...
pietschy 390 over 10 years ago Moved files to test protected me...
pietschy 410 over 9 years ago Release 1.1.43
-= G U I  C O M M A N D S =-

This is a development release of the next version of GUI Commands.  Considerable changes
have been made internally to improve the design and there are a number of new features. This
release hasn't had the testing (ie I haven't migrated my own projects to it yet) of previous
releases, so if you find bugs, let me know.

_Quick guide to the new features._

You can now have one face inherit the attributes of another.
For example.

   <command id="command-one">
      <face name="menu">
         <text>Hello World!!!</text>

   <command id="command-two">
      <face extends="command-one[menu]"/>

You can also extend faces in the same command.  In the following example, the button face extends
the command-two's default face which in turn extends the menu face of command-one.

   <command id="command-two">
      <face extends="command-one[menu]"/>
      <face name="button" extends="[default]"/>

There is also now the possibility to define faces outside of commands in the face-defs section.
This allows you to share a generic face amoungst various commands.

      <face-def id="generic-save">
            <text mnemonic="s">Save</text>
         <face name="menu" extends="[default]">
            <icon type="classpath">images/save-menu-icon.png</icon>

These faces can then referenced by other faces in the normal manner.

   <command id="command-save">
      <face extends="generic-save"/>
      <face name="menu" extends="generic-save[menu]"/>

Commands can now be automatically instantiated by the command manager if you specify the class of the
command in the configuration and have it provide a constructor that takes the command id and
the command manager.

   <command id="feed-road-runner">

You can also specify the implementation of a group the same way.  The group must also provide a
constructor that take the group id and the command manager.

   <group id="wiz-bang-group">

To help with custom implementations of groups (and commands) the configuration file can now
specify named properties.  These can be accessed via Command.getProperty(String name).

   <group id="wiz-bang-group">
      <property name="mode">DEBUG</property>

The new programatic face creation behaviour makes it easy to implement on the fly commands
and faces.  Commands and Groups can now also be anonymous in that they don't required an Id.
Such commands can't be configured using XML or exported.  There are intended to be used only
in a programatic manner.

   ActionCommand c = new ActionCommand()
      public void handleExecute() {}
   c.addNewFace("default").setText("My Anonymous Command");

I've also added a new <glue/> member type to GroupCommands.  It simply uses the Box.createGlue()
methods to insert space fillers.

   <group id="a-group">
         <member idref=""/>
         <!-- this will push the remaining members to the end of the groups event -->
         <member idref="group.two"/>

And last but not least, I've added a GroupCommand.createMenuBar() method to create menubars.


Please Confirm