01: /*
02: * Copyright (C) 2007 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.client.plugin.gui;
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.preferences.IGlobalPreferencesPanel;
27:
28: public class PluginGlobalPreferencesTab implements
29: IGlobalPreferencesPanel {
30:
31: protected PluginQueryTokenizerPreferencesPanel _prefs = null;
32:
33: private JScrollPane _myscrolledPanel;
34:
35: private String _title = null;
36:
37: private String _hint = null;
38:
39: public PluginGlobalPreferencesTab(
40: PluginQueryTokenizerPreferencesPanel prefsPanel) {
41: _myscrolledPanel = new JScrollPane(prefsPanel);
42: _prefs = prefsPanel;
43: }
44:
45: public void initialize(IApplication app) {
46: /* Do Nothing */
47: }
48:
49: public void uninitialize(IApplication app) {
50: /* Do Nothing */
51: }
52:
53: public void applyChanges() {
54: if (_prefs != null) {
55: _prefs.applyChanges();
56: }
57: }
58:
59: /*
60: * (non-Javadoc)
61: *
62: * @see net.sourceforge.squirrel_sql.client.util.IOptionPanel#getTitle()
63: */
64: public String getTitle() {
65: return _title;
66: }
67:
68: public void setTitle(String title) {
69: this ._title = title;
70: }
71:
72: /*
73: * (non-Javadoc)
74: *
75: * @see net.sourceforge.squirrel_sql.client.util.IOptionPanel#getHint()
76: */
77: public String getHint() {
78: return _hint;
79: }
80:
81: public void setHint(String hint) {
82: this ._hint = hint;
83: }
84:
85: public Component getPanelComponent() {
86: return _myscrolledPanel;
87: }
88:
89: }
|