Home » openjdk-7 » sun » swing » [javadoc | source]
sun.swing
abstract public class: UIAction [javadoc | source]
java.lang.Object
   sun.swing.UIAction

All Implemented Interfaces:
    Action

UIAction is the basis of all of basic's action classes that are used in an ActionMap. Subclasses need to override actionPerformed.

A typical subclass will look like:

   private static class Actions extends UIAction {
       Actions(String name) {
           super(name);
       }

       public void actionPerformed(ActionEvent ae) {
           if (getName() == "selectAll") {
               selectAll();
           }
           else if (getName() == "cancelEditing") {
               cancelEditing();
           }
       }
   }

Subclasses that wish to conditionalize the enabled state should override isEnabled(Component), and be aware that the passed in Component may be null.

Constructor:
 public UIAction(String name) 
Method from sun.swing.UIAction Summary:
addPropertyChangeListener,   getName,   getValue,   isEnabled,   isEnabled,   putValue,   removePropertyChangeListener,   setEnabled
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.swing.UIAction Detail:
 public  void addPropertyChangeListener(PropertyChangeListener listener) 
 public final String getName() 
 public Object getValue(String key) 
 public final boolean isEnabled() 
    Cover method for isEnabled(null).
 public boolean isEnabled(Object sender) 
    Subclasses that need to conditionalize the enabled state should override this. Be aware that sender may be null.
 public  void putValue(String key,
    Object value) 
 public  void removePropertyChangeListener(PropertyChangeListener listener) 
 public  void setEnabled(boolean b)