01: /*
02: * ColumnSelectionAction.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.KeyEvent;
16:
17: import javax.swing.KeyStroke;
18:
19: import workbench.gui.sql.EditorPanel;
20: import workbench.resource.ResourceMgr;
21:
22: /**
23: * Action to enable column selection for the next selection in the editor
24: * @author support@sql-workbench.net
25: */
26: public class ColumnSelectionAction extends WbAction {
27: private EditorPanel client;
28:
29: public ColumnSelectionAction(EditorPanel aClient) {
30: super ();
31: this .client = aClient;
32: this .initMenuDefinition("MnuTxtColumnSelection", KeyStroke
33: .getKeyStroke(KeyEvent.VK_Q, KeyEvent.ALT_MASK));
34: this .setMenuItemName(ResourceMgr.MNU_TXT_EDIT);
35: this .setEnabled(true);
36: }
37:
38: public void executeAction(ActionEvent e) {
39: this.client.enableColumnSelection();
40: }
41:
42: }
|