01: /*
02: * FindAction.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:
18: import javax.swing.KeyStroke;
19:
20: import workbench.interfaces.Searchable;
21: import workbench.resource.ResourceMgr;
22:
23: /**
24: * @author support@sql-workbench.net
25: */
26: public class FindAction extends WbAction {
27: private Searchable client;
28:
29: public FindAction(Searchable aClient) {
30: super ();
31: this .client = aClient;
32: this .initMenuDefinition("MnuTxtFind", KeyStroke.getKeyStroke(
33: KeyEvent.VK_F, InputEvent.CTRL_MASK));
34: this .setIcon(ResourceMgr.getImage("Find"));
35: this .setMenuItemName(ResourceMgr.MNU_TXT_EDIT);
36: this .setCreateToolbarSeparator(true);
37: }
38:
39: public void executeAction(ActionEvent e) {
40: this.client.find();
41: }
42: }
|