Make it easy to use a controller as an action listener in the standard AWT
style. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1659 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -68,6 +68,7 @@ import com.samskivert.swing.event.CommandEvent;
|
||||
* the controllers.
|
||||
*/
|
||||
public abstract class Controller
|
||||
implements ActionListener
|
||||
{
|
||||
/**
|
||||
* This action listener can be wired up to any action event generator
|
||||
@@ -267,6 +268,12 @@ public abstract class Controller
|
||||
return handleAction(new CommandEvent(source, command, arg));
|
||||
}
|
||||
|
||||
// documentation inherited from interface ActionListener
|
||||
public void actionPerformed (ActionEvent event)
|
||||
{
|
||||
handleAction(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by {@link #handleAction} to generate arguments to the action
|
||||
* handler method.
|
||||
|
||||
Reference in New Issue
Block a user