|
//MiniActions.java
import java.util.Hashtable;
import java.awt.event.ActionEvent;
import javax.swing.*;
public class MiniActions extends Hashtable {
MiniEdit theApp;
public MiniActions(MiniEdit theApp) {
this.theApp = theApp;
put("new", new NewAction(theApp));
put("open", new OpenAction(theApp));
put("quit", new QuitAction(theApp));
}
public Action getAction(String name) {
return (Action) get(name);
}
}
|