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
-
DefaultAction()
-
-
DefaultAction(String)
-
-
DefaultAction(String, Icon)
-
-
actionPerformed(ActionEvent)
-
-
addPropertyChangeListener(PropertyChangeListener)
- Add a PropertyChangeListener to the listener list.
-
firePropertyChange(String, Object, Object)
- Support for reporting bound property changes.
-
getIcon(String)
-
-
getText(String)
-
-
isEnabled()
-
-
removePropertyChangeListener(PropertyChangeListener)
- Remove a PropertyChangeListener from the listener list.
-
setEnabled(boolean)
-
-
setIcon(String, Icon)
-
-
setText(String, String)
-
DefaultAction
public DefaultAction()
DefaultAction
public DefaultAction(String name)
DefaultAction
public DefaultAction(String name,
Icon icon)
actionPerformed
public void actionPerformed(ActionEvent e)
getText
public String getText(String key)
setText
public void setText(String key,
String newValue)
getIcon
public Icon getIcon(String key)
setIcon
public void setIcon(String key,
Icon newValue)
isEnabled
public boolean isEnabled()
setEnabled
public void setEnabled(boolean newValue)
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
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
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