01: /*
02: * CloseWorkspaceAction.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.gui.MainWindow;
17: import workbench.resource.ResourceMgr;
18:
19: /**
20: * Action to close the current workspace
21: * @see workbench.gui.MainWindow#closeWorkspace()
22: * @author support@sql-workbench.net
23: */
24: public class CloseWorkspaceAction extends WbAction {
25: private MainWindow client;
26:
27: public CloseWorkspaceAction(MainWindow aClient) {
28: super ();
29: this .client = aClient;
30: this .initMenuDefinition("MnuTxtCloseWorkspace", null);
31: this .setMenuItemName(ResourceMgr.MNU_TXT_WORKSPACE);
32: this .setIcon(null);
33: }
34:
35: public void executeAction(ActionEvent e) {
36: this.client.closeWorkspace();
37: }
38: }
|