org.apache.jetspeed.portlet.event
Class ActionAdapter
java.lang.Object
|
+--org.apache.jetspeed.portlet.event.ActionAdapter
- All Implemented Interfaces:
- ActionListener
- public abstract class ActionAdapter
- extends Object
- implements ActionListener
The ActionAdapter
is an action listener in which all
callback methods are empty implementations. The action adapter makes
it more convenient for an object to listen for action events.
In particular, by using the action adapter, it is possible to
implement only those callback methods in which you are interested.
Without the action adapter, you must implement all callback methods,
even if the method is empty.
At this stage, this may sound like overkill since the action listener
only defines one method. The adapter therefore only provides a default
implementation for a method you are going override anyway. But to
ensure backward compatibility in future release, it is recommended to
still follow this practice so that you will be able to enjoy
functionality in future releases without having to go back to all your
listener code.
To use the action adapter, you create a subclass of
ActionAdapter
and override the desired callback methods.
You then create an instance of the action adapter subclass and use it
to register it as a listener for action events.
- See Also:
ActionEvent
Method Summary |
void |
actionPerformed(ActionEvent event)
Notifies this listener that the action which
the listener is watching for has been performed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ActionAdapter
public ActionAdapter()
actionPerformed
public void actionPerformed(ActionEvent event)
- Description copied from interface:
ActionListener
- Notifies this listener that the action which
the listener is watching for has been performed.
- Specified by:
actionPerformed
in interface ActionListener
- Following copied from interface:
org.apache.jetspeed.portlet.event.ActionListener
- Parameters:
event
- the action event