org.argouml.swingext
Class ActionUtilities

java.lang.Object
  extended byorg.argouml.swingext.ActionUtilities

public class ActionUtilities
extends java.lang.Object

A collection of utility methods for Swing Actions.


Constructor Summary
ActionUtilities()
           
 
Method Summary
static java.awt.Container getActionRoot(java.awt.event.ActionEvent ae)
          Intended for use inside an actionPerformed method eg:
static java.awt.Container getActionRoot(java.lang.Object source)
          Intended for use inside an actionPerformed method eg:
private static java.awt.Container getContainer(java.awt.Component source)
          Helper method to find the Container of Component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionUtilities

public ActionUtilities()
Method Detail

getActionRoot

public static java.awt.Container getActionRoot(java.awt.event.ActionEvent ae)
Intended for use inside an actionPerformed method eg:
     public void actionPerformed(ActionEvent ae) {
         Container appRoot = ActionUtilities.getActionRoot(ae);
     }
 
Returns the root object, usually a JFrame, JDialog or JApplet that is the owner of the source event source object (JMenu, JMenuItem, JPopupMenu etc).


getActionRoot

public static java.awt.Container getActionRoot(java.lang.Object source)
Intended for use inside an actionPerformed method eg:
     public void actionPerformed(ActionEvent e) {
         Container appRoot = ActionUtilities.getActionRoot(e.getSource());
     }
 

Returns:
the root object, usually a JFrame, JDialog or JApplet that is the owner of the source event source object (JMenu, JMenuItem, JPopupMenu etc). null if none is found.

getContainer

private static java.awt.Container getContainer(java.awt.Component source)
Helper method to find the Container of Component.



ArgoUML © 1996-2004 (20040316)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook