01: /*
02: * Copyright (C) 2006 Rob Manning
03: * manningr@users.sourceforge.net
04: *
05: * This program is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU General Public License
07: * as published by the Free Software Foundation; either version 2
08: * of the License, or any later version.
09: *
10: * This program is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13: * GNU General Public License for more details.
14: *
15: * You should have received a copy of the GNU General Public License
16: * along with this program; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18: */
19: package net.sourceforge.squirrel_sql.plugins.sqlscript.prefs;
20:
21: import java.awt.Component;
22:
23: import javax.swing.JScrollPane;
24:
25: import net.sourceforge.squirrel_sql.client.IApplication;
26: import net.sourceforge.squirrel_sql.client.plugin.PluginResources;
27: import net.sourceforge.squirrel_sql.client.preferences.IGlobalPreferencesPanel;
28: import net.sourceforge.squirrel_sql.fw.util.StringManager;
29: import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
30:
31: public class SQLScriptPreferencesTab implements IGlobalPreferencesPanel {
32:
33: SQLScriptPreferencesPanel prefsPanel = null;
34: private JScrollPane _myscrolledPanel;
35:
36: private static final StringManager s_stringMgr = StringManagerFactory
37: .getStringManager(SQLScriptPreferencesTab.class);
38:
39: PluginResources _resources = null;
40:
41: public SQLScriptPreferencesTab() {
42:
43: SQLScriptPreferenceBean bean = SQLScriptPreferencesManager
44: .getPreferences();
45: prefsPanel = new SQLScriptPreferencesPanel(bean);
46: _myscrolledPanel = new JScrollPane(prefsPanel);
47:
48: }
49:
50: public void initialize(IApplication app) {
51: /* Do Nothing */
52: }
53:
54: public void uninitialize(IApplication app) {
55: /* Do Nothing */
56: }
57:
58: public void applyChanges() {
59: if (prefsPanel != null) {
60: prefsPanel.applyChanges();
61: }
62: }
63:
64: /* (non-Javadoc)
65: * @see net.sourceforge.squirrel_sql.client.util.IOptionPanel#getTitle()
66: */
67: public String getTitle() {
68: //i18n[SQLScriptPreferencesTab.title=SQL Scripts]
69: return s_stringMgr.getString("SQLScriptPreferencesTab.title");
70: }
71:
72: /* (non-Javadoc)
73: * @see net.sourceforge.squirrel_sql.client.util.IOptionPanel#getHint()
74: */
75: public String getHint() {
76: // i18n[SQLScriptPreferencesTab.hint=Settings for the SQL Script plugin]
77: return s_stringMgr.getString("SQLScriptPreferencesTab.hint");
78: }
79:
80: public Component getPanelComponent() {
81: return _myscrolledPanel;
82: }
83:
84: }
|