dsto.dfc.swing.commands
Class CommandToolBars

java.lang.Object
  extended by dsto.dfc.swing.commands.CommandToolBars

public final class CommandToolBars
extends Object

Utility class for creating toolbars from command views.

Version:
$Revision$

Field Summary
static Object SHOW_NAME_KEY
          Key for indicating that a command should be shown with its command name text on the toolbar.
 
Method Summary
static void addToolBarDivider(JToolBar toolBar)
          Add a divider to the bottom of the toolbar, similar to that used at the bottom of a menu bar.
static void makeToolBar(JToolBar toolbar, CommandView commandView)
          Create a toolbar from the specified command view.
static void showName(CommandView view, Command command)
          Shortcut to set the SHOW_NAME_KEY command property to true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SHOW_NAME_KEY

public static final Object SHOW_NAME_KEY
Key for indicating that a command should be shown with its command name text on the toolbar.

eg:

   commandView.setCommandProperty (command.getName (),
                                   CommandToolbars.SHOW_NAME_KEY,
                                   Boolean.TRUE);
 

Method Detail

makeToolBar

public static void makeToolBar(JToolBar toolbar,
                               CommandView commandView)
Create a toolbar from the specified command view.


addToolBarDivider

public static void addToolBarDivider(JToolBar toolBar)
Add a divider to the bottom of the toolbar, similar to that used at the bottom of a menu bar.


showName

public static void showName(CommandView view,
                            Command command)
Shortcut to set the SHOW_NAME_KEY command property to true. You usually have to call this before adding the command to the view for the toolbar UI to honor it.



Copyright © 2008 Commonwealth of Australia