// if one is in progress.
private ActionListener createStopButtonListener() {
return new ActionListener() {
public void actionPerformed(ActionEvent e) {
mediator.stopCurrentTask();
StopRequestMessage msg = new StopRequestMessage(this);
mediator.getStopRequestNotifier().notifyListeners(msg);
}
};
}