01: /*
02: * ReplaceDataAction.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: import java.awt.event.InputEvent;
16: import java.awt.event.KeyEvent;
17: import javax.swing.KeyStroke;
18: import workbench.interfaces.Replaceable;
19: import workbench.interfaces.Replaceable;
20: import workbench.resource.ResourceMgr;
21:
22: /**
23: * Search and replace inside the result set
24: *
25: * @author support@sql-workbench.net
26: */
27: public class ReplaceDataAction extends WbAction {
28: private Replaceable client;
29:
30: public ReplaceDataAction(Replaceable aClient) {
31: super ();
32: this .client = aClient;
33: this .initMenuDefinition("MnuTxtReplaceInTableData", KeyStroke
34: .getKeyStroke(KeyEvent.VK_H, InputEvent.CTRL_MASK
35: | InputEvent.SHIFT_MASK));
36: this .setMenuItemName(ResourceMgr.MNU_TXT_DATA);
37: this .setCreateToolbarSeparator(false);
38: }
39:
40: public void executeAction(ActionEvent e) {
41: this.client.replace();
42: }
43: }
|