GUI Commands – Simplifying Swing

GUI Commands takes the effort out of creating and managing buttons, menus and toolbars in Swing user interface applications. It provides a complete solution that is both easy to use and supports functionality well beyond Swings basic Action infrastructure.

Inspiration

The library was inspired by two JavaOne presentations that are well worth reading:

What can it do for me?

  • Build complex menus and toolbars quickly and simply.
  • Advanced functionality is made simple, dynamic menus take just a few lines of code, focus tracking delegates with just a few more.
  • Control how your buttons appear in any context from your configuration files.
  • Convenience classes and methods for many common tasks. E.g. simply use a HoverListener with your status bar and display help for any command under the mouse.
  • Avoid cut and paste in your configuration using face extension and variables.
  • The use of component factories give you complete control over the buttons and menus generated by the library.
  • Supports platform specific conventions when configuring buttons and menus.
  • Extremely simple to use.

Key Features

Commands and Command Groups - The command pattern provides a solid Object Oriented base for your applications. GUI Commands provides a standard implementation that cleanly separates the view aspects from the commands themselves. Command Groups allow you to combine commands and other groups into hierarchical structures for the creation of menus, toolbars and popups. Group builders can be used to dynamically update the group at runtime.

Configuration – GUI Commands provides comprehensive configuration support using standard ResourceBundles. Command configuration can be easily specified for various views such as buttons, menus and toolbars. GUI Commands ensures the correct configuration is used based on the context of the components. GUI Commands also applies platform specific rendering ensuring you application behaves correctly where ever it runs.

Standard Infrastructure – GUI Commands provides standard infrastructure and mechanisms for performing common tasks such as configuration, delegation, glass pane activation and more. This provides a consistent approach for application development that can be easily understood and applied. This is very important when dealing with larger teams and more complex projects.

Convenience – The combination of commands, groups and common infrastructure allows you create complex functionality quickly and easily. On top of this, the library also provides standard commands for actions such as opening files, displaying recent file lists, closing windows and displaying command descriptions. Beyond this there are many convenience methods that make life easier; ActionCommand.getInvokerWindow() is a typical example.

Why not take the 2 minute tutorial or try the demo and see for yourself?