01: /*
02: * Copyright (C) 2005 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.dbcopy.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: import net.sourceforge.squirrel_sql.fw.util.StringManager;
28: import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory;
29: import net.sourceforge.squirrel_sql.plugins.dbcopy.prefs.PreferencesManager;
30:
31: public class DBCopyGlobalPreferencesTab implements
32: IGlobalPreferencesPanel {
33:
34: PreferencesPanel prefs = null;
35: private JScrollPane _myscrolledPanel;
36:
37: private static final StringManager s_stringMgr = StringManagerFactory
38: .getStringManager(DBCopyGlobalPreferencesTab.class);
39:
40: public DBCopyGlobalPreferencesTab() {
41: prefs = new PreferencesPanel(PreferencesManager
42: .getPreferences());
43: _myscrolledPanel = new JScrollPane(prefs);
44: _myscrolledPanel.getVerticalScrollBar().setUnitIncrement(10);
45: }
46:
47: public void initialize(IApplication app) {
48: /* Do Nothing */
49: }
50:
51: public void uninitialize(IApplication app) {
52: /* Do Nothing */
53: }
54:
55: public void applyChanges() {
56: if (prefs != null) {
57: prefs.applyChanges();
58: }
59: }
60:
61: /* (non-Javadoc)
62: * @see net.sourceforge.squirrel_sql.client.util.IOptionPanel#getTitle()
63: */
64: public String getTitle() {
65: //i18n[DBCopyGlobalPreferencesTab.title=DB Copy]
66: return s_stringMgr
67: .getString("DBCopyGlobalPreferencesTab.title");
68: }
69:
70: /* (non-Javadoc)
71: * @see net.sourceforge.squirrel_sql.client.util.IOptionPanel#getHint()
72: */
73: public String getHint() {
74: // i18n[DBCopyGlobalPreferencesTab.hint=Preferences for DB Copy]
75: return s_stringMgr.getString("DBCopyGlobalPreferencesTab.hint");
76: }
77:
78: public Component getPanelComponent() {
79: return _myscrolledPanel;
80: }
81:
82: }
|