01: /*
02: * FileSaveAsAction.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.TextFileContainer;
17: import workbench.resource.ResourceMgr;
18:
19: /**
20: * Save the current file in the SQL Editor with a new name.
21: * @author support@sql-workbench.net
22: */
23: public class FileSaveAsAction extends WbAction {
24: private TextFileContainer client;
25:
26: public FileSaveAsAction(TextFileContainer aClient) {
27: super ();
28: this .client = aClient;
29: this .initMenuDefinition("MnuTxtFileSaveAs");
30: this .setMenuItemName(ResourceMgr.MNU_TXT_FILE);
31: }
32:
33: public void executeAction(ActionEvent e) {
34: this.client.saveFile();
35: }
36: }
|