01: /*
02: * UpdateDatabaseAction.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.DbUpdater;
17: import workbench.resource.ResourceMgr;
18:
19: /**
20: * @author support@sql-workbench.net
21: */
22: public class UpdateDatabaseAction extends WbAction {
23: private DbUpdater panel;
24:
25: public UpdateDatabaseAction(DbUpdater aPanel) {
26: super ();
27: this .panel = aPanel;
28: this .initMenuDefinition("MnuTxtUpdateDatabase");
29: this .setIcon(ResourceMgr.getImage(ResourceMgr.IMG_SAVE));
30: this .setMenuItemName(ResourceMgr.MNU_TXT_DATA);
31: this .setCreateToolbarSeparator(true);
32: this .setEnabled(false);
33: }
34:
35: public void executeAction(ActionEvent e) {
36: panel.saveChangesToDatabase();
37: }
38:
39: public void setClient(DbUpdater client) {
40: this.panel = client;
41: }
42:
43: }
|