01: /*
02: * SaveListFileAction.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.FileActions;
17: import workbench.log.LogMgr;
18: import workbench.resource.ResourceMgr;
19:
20: /**
21: * @author support@sql-workbench.net
22: */
23: public class SaveListFileAction extends WbAction {
24: private FileActions client;
25:
26: public SaveListFileAction(FileActions aClient) {
27: this .client = aClient;
28: this .setMenuTextByKey("LblSaveProfiles");
29: this .setIcon(ResourceMgr.getImage(ResourceMgr.IMG_SAVE));
30: }
31:
32: public void executeAction(ActionEvent e) {
33: try {
34: this .client.saveItem();
35: } catch (Exception ex) {
36: LogMgr.logError(this , "Error saving profiles", ex);
37: }
38: }
39: }
|