All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.DefaultAction

java.lang.Object
   |
   +----com.sun.java.swing.DefaultAction

public class DefaultAction
extends Object
implements Action
JFC Action interface


Constructor Index

 o DefaultAction()
 o DefaultAction(String)
 o DefaultAction(String, Icon)

Method Index

 o actionPerformed(ActionEvent)
 o addPropertyChangeListener(PropertyChangeListener)
Add a PropertyChangeListener to the listener list.
 o firePropertyChange(String, Object, Object)
Support for reporting bound property changes.
 o getIcon(String)
 o getText(String)
 o isEnabled()
 o removePropertyChangeListener(PropertyChangeListener)
Remove a PropertyChangeListener from the listener list.
 o setEnabled(boolean)
 o setIcon(String, Icon)
 o setText(String, String)

Constructors

 o DefaultAction
 public DefaultAction()
 o DefaultAction
 public DefaultAction(String name)
 o DefaultAction
 public DefaultAction(String name,
                      Icon icon)

Methods

 o actionPerformed
 public void actionPerformed(ActionEvent e)
 o getText
 public String getText(String key)
 o setText
 public void setText(String key,
                     String newValue)
 o getIcon
 public Icon getIcon(String key)
 o setIcon
 public void setIcon(String key,
                     Icon newValue)
 o isEnabled
 public boolean isEnabled()
 o setEnabled
 public void setEnabled(boolean newValue)
 o firePropertyChange
 protected void firePropertyChange(String propertyName,
                                   Object oldValue,
                                   Object newValue)
Support for reporting bound property changes. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

This method will migrate to java.awt.Component in the next major JDK release

 o addPropertyChangeListener
 public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired in response to setting a bound property, e.g. setFont, setBackground, or setForeground. Note that if the current component is inheriting its foreground, background, or font from its container, then no event will be fired in response to a change in the inherited property.

This method will migrate to java.awt.Component in the next major JDK release

Parameters:
listener - The PropertyChangeListener to be added
 o removePropertyChangeListener
 public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

This method will migrate to java.awt.Component in the next major JDK release

Parameters:
listener - The PropertyChangeListener to be removed

All Packages  Class Hierarchy  This Package  Previous  Next  Index