01: /*
02: * StopAction.java
03: *
04: * This file is part of SQL Workbench/J, http://www.sql-workbench.net
05: *
06: * Copyright 2002-2008, Thomas Kellerer
07: * No part of this code maybe reused without the permission of the author
08: *
09: * To contact the author please send an email to: support@sql-workbench.net
10: *
11: */
12: package workbench.gui.actions;
13:
14: import java.awt.event.ActionEvent;
15:
16: import workbench.interfaces.Interruptable;
17: import workbench.resource.ResourceMgr;
18:
19: /**
20: * @author support@sql-workbench.net
21: */
22: public class StopAction extends WbAction {
23: private Interruptable panel;
24:
25: public StopAction(Interruptable aPanel) {
26: super ();
27: this .panel = aPanel;
28: this .initMenuDefinition("MnuTxtStopStmt");
29: this .setIcon(ResourceMgr.getImage("Stop"));
30: this .setMenuItemName(ResourceMgr.MNU_TXT_SQL);
31: this .setCreateMenuSeparator(true);
32: }
33:
34: public void executeAction(ActionEvent e) {
35: this.panel.cancelExecution();
36: }
37: }
|