de.kosi.gui.action
Class InvokeMethod
java.lang.Object
|
+--javax.swing.AbstractAction
|
+--de.kosi.gui.action.CAction
|
+--de.kosi.gui.action.InvokeMethod
- All Implemented Interfaces:
- javax.swing.Action, java.awt.event.ActionListener, java.lang.Cloneable, java.util.EventListener, ResourceBundleChangeListener, java.io.Serializable
- public class InvokeMethod
- extends CAction
An action implementation that allows to simply use methods
as actions.
ChangeLog:
$Log: InvokeMethod.java,v $
Revision 1.4 2001/06/27 19:09:18 jiriki
Resolved minor bugs. Updated docs.
- Version:
- $Revision: 1.4 $ ($Date: 2001/06/27 19:09:18 $)
- Author:
- Jan-Christian Marinesse
- See Also:
- Serialized Form
Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
Constructor Summary |
InvokeMethod(java.lang.Object object,
java.lang.reflect.Method method)
Initializes an action object that calls the specified
method of the specified object when performed. |
InvokeMethod(java.lang.Object object,
java.lang.String methodName)
Initializes an action object that calls object's method
with th signature 'public void methodName(ActionEvent)' when
performed. |
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent event)
Invokes the method related to this action. |
Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InvokeMethod
public InvokeMethod(java.lang.Object object,
java.lang.reflect.Method method)
- Initializes an action object that calls the specified
method of the specified object when performed.
- Parameters:
object
- the object the method belongs to.method
- the method to invoke when this
action gets performed.
InvokeMethod
public InvokeMethod(java.lang.Object object,
java.lang.String methodName)
- Initializes an action object that calls object's method
with th signature 'public void methodName(ActionEvent)' when
performed.
- Parameters:
object
- the object the method belongs to.methodName
- the name of the method to invoke
when this action gets performed.
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Invokes the method related to this action.
- Overrides:
actionPerformed
in class javax.swing.AbstractAction
- Parameters:
event
- Event for this action.