com.mucommander.ui.action
Class ProxyAction
java.lang.Object
com.mucommander.ui.action.ProxyAction
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.util.EventListener, javax.swing.Action
- Direct Known Subclasses:
- MuteProxyAction
public abstract class ProxyAction
- extends java.lang.Object
- implements javax.swing.Action
ProxyAction is a proxy for an Action instance. All Action methods are proxied except for actionPerformed().
That means all properties of the proxied Action are preserved but the proxied Action is not performed.
ProxyAction is useful to keep the visual properties of an Action instance in a component (JButton for instance)
but perform a different action.
This class is abstract, leaving actionPerformed() unimplemented. MuteProxyAction provides an
implementation where actionPerformed() does nothing.
- Author:
- Maxence Bernard
|
Field Summary |
protected javax.swing.Action |
proxiedAction
Proxied action |
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
|
Constructor Summary |
ProxyAction(javax.swing.Action proxiedAction)
Creates a new ProxyAction that acts as a proxy to the provided Action instance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.awt.event.ActionListener |
actionPerformed |
proxiedAction
protected javax.swing.Action proxiedAction
- Proxied action
ProxyAction
public ProxyAction(javax.swing.Action proxiedAction)
- Creates a new ProxyAction that acts as a proxy to the provided Action instance.
- Parameters:
proxiedAction - the action to proxy
getProxiedAction
public javax.swing.Action getProxiedAction()
- Returns the Action instance that this ProxyAction proxies.
getValue
public java.lang.Object getValue(java.lang.String key)
- Specified by:
getValue in interface javax.swing.Action
putValue
public void putValue(java.lang.String key,
java.lang.Object value)
- Specified by:
putValue in interface javax.swing.Action
setEnabled
public void setEnabled(boolean b)
- Specified by:
setEnabled in interface javax.swing.Action
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled in interface javax.swing.Action
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
- Specified by:
addPropertyChangeListener in interface javax.swing.Action
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener propertyChangeListener)
- Specified by:
removePropertyChangeListener in interface javax.swing.Action
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard