public class Controller extends Object implements ActionListener
Constructor and Description |
---|
Controller()
Creates a controller with no view or model.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent event)
Responds to events emitted from the view.
|
void |
setModel(Model m)
Sets the model for this controller.
|
void |
setView(View v)
Sets the view for this controller.
|
public void setView(View v)
v
- the viewpublic void setModel(Model m)
m
- the modelpublic void actionPerformed(ActionEvent event)
"GO"
.actionPerformed
in interface ActionListener
ActionListener.actionPerformed(java.awt.event.ActionEvent)
event
- the event to respond to