org.progeeks.util.swing
Class ActionUtils

java.lang.Object
  extended by org.progeeks.util.swing.ActionUtils

public class ActionUtils
extends java.lang.Object

A set of utility methods for dealing with actions and action lists.

Version:
$Revision: 1.19 $
Author:
Paul Speed

Constructor Summary
ActionUtils()
           
 
Method Summary
static javax.swing.Action cloneAction(javax.swing.Action o)
          Utility method to clone the specified action if it is cloneable.
static javax.swing.JMenu createActionMenu(ActionList actions)
          Creates a menu for the specified action list.
static javax.swing.JMenuBar createActionMenuBar(ActionList actions)
          Creates a menu bar for the specified action list.
static javax.swing.JMenuItem createActionMenuItem(javax.swing.Action a)
          Creates a menu for the specified action.
static javax.swing.JPopupMenu createPopupMenu(ActionList actions)
          Creates a pop-up menu for the specified action list.
static javax.swing.JToolBar createToolBar(ActionList actions)
          Creates a JToolBar for the specified action list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionUtils

public ActionUtils()
Method Detail

createActionMenu

public static javax.swing.JMenu createActionMenu(ActionList actions)
Creates a menu for the specified action list.


createActionMenuBar

public static javax.swing.JMenuBar createActionMenuBar(ActionList actions)
Creates a menu bar for the specified action list.


createPopupMenu

public static javax.swing.JPopupMenu createPopupMenu(ActionList actions)
Creates a pop-up menu for the specified action list.


createToolBar

public static javax.swing.JToolBar createToolBar(ActionList actions)
Creates a JToolBar for the specified action list.


createActionMenuItem

public static javax.swing.JMenuItem createActionMenuItem(javax.swing.Action a)
Creates a menu for the specified action. This method will determine the appropriate menu to create based on the class of the action specified. If it is an ActionList then that createActionMenu will be called. If it is a CheckBoxAction then a JCheckBoxMenuItem will be created. If no special processing is done then a JMenuItem will be created.


cloneAction

public static javax.swing.Action cloneAction(javax.swing.Action o)
Utility method to clone the specified action if it is cloneable. Otherwise, the original action is returned.



Copyright © 2002-2003 Paul Speed. All Rights Reserved.