01: /*
02: * OptionsDialogAction.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.EventQueue;
15: import java.awt.event.ActionEvent;
16: import workbench.WbManager;
17: import workbench.gui.MainWindow;
18: import workbench.gui.settings.SettingsPanel;
19: import workbench.resource.ResourceMgr;
20:
21: /**
22: * @author support@sql-workbench.net
23: */
24: public class OptionsDialogAction extends WbAction {
25: public OptionsDialogAction() {
26: super ();
27: initMenuDefinition(ResourceMgr.MNU_TXT_OPTIONS);
28: this .removeIcon();
29: }
30:
31: public void executeAction(ActionEvent e) {
32: showOptionsDialog();
33: }
34:
35: public static void showOptionsDialog() {
36: final MainWindow parent = WbManager.getInstance()
37: .getCurrentWindow();
38: EventQueue.invokeLater(new Runnable() {
39: public void run() {
40: SettingsPanel panel = new SettingsPanel();
41: panel.showSettingsDialog(parent);
42: }
43: });
44: }
45: }
|