01: /*
02: * OpenEditWindowAction.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.gui.components.WbTextCellEditor;
19: import workbench.gui.sql.SqlPanel;
20: import workbench.log.LogMgr;
21: import workbench.resource.ResourceMgr;
22: import workbench.sql.MacroManager;
23:
24: /**
25: *
26: * @author support@sql-workbench.net
27: */
28: public class OpenEditWindowAction extends WbAction {
29: private WbTextCellEditor editor;
30:
31: public OpenEditWindowAction(WbTextCellEditor ed) {
32: super ();
33: this .editor = ed;
34: this .setDefaultAccelerator(KeyStroke.getKeyStroke(
35: KeyEvent.VK_E, InputEvent.CTRL_MASK));
36: this .setIcon(null);
37: }
38:
39: public void executeAction(ActionEvent e) {
40: editor.openEditWindow();
41: }
42:
43: }
|