01: /*
02: * Gruntspud
03: *
04: * Copyright (C) 2002 Brett Smith.
05: *
06: * Written by: Brett Smith <t_magicthize@users.sourceforge.net>
07: *
08: * This program is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU Library General Public License
10: * as published by the Free Software Foundation; either version 2 of
11: * the License, or (at your option) any later version.
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU Library General Public License for more details.
16: *
17: * You should have received a copy of the GNU Library General Public
18: * License along with this program; if not, write to the Free Software
19: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20: */
21:
22: package gruntspud.ui.preferences;
23:
24: import gruntspud.Constants;
25: import gruntspud.GruntspudContext;
26: import gruntspud.ui.UIUtil;
27:
28: import java.awt.BorderLayout;
29:
30: import javax.swing.BorderFactory;
31:
32: /**
33: * Description of the Class
34: *
35: *@author magicthize
36: *@created 26 May 2002
37: */
38: public class PasswordManagerOptionsTab extends AbstractOptionsTab {
39: private PasswordManagerPane passwords;
40:
41: /**
42: * Constructor for the GlobalOptionsTab object
43: */
44: public PasswordManagerOptionsTab() {
45: super ("Passwords", UIUtil
46: .getCachedIcon(Constants.ICON_TOOL_LOCK));
47: }
48:
49: /**
50: * DOCUMENT ME!
51: *
52: * @param context DOCUMENT ME!
53: */
54: public void init(GruntspudContext context) {
55: super .init(context);
56:
57: setTabToolTipText("The password manager stores passwords for CVS\n"
58: + "access, http servers, proxy servers and socks\n"
59: + "servers.");
60: setTabLargeIcon(UIUtil
61: .getCachedIcon(Constants.ICON_TOOL_LARGE_LOCK));
62: setTabMnemonic('p');
63: setTabContext("Advanced");
64:
65: passwords = new PasswordManagerPane(context);
66: passwords
67: .setBorder(BorderFactory.createEmptyBorder(2, 2, 6, 2));
68:
69: setLayout(new BorderLayout());
70: add(passwords, BorderLayout.CENTER);
71: }
72:
73: /**
74: * Description of the Method
75: *
76: *@return Description of the Return Value
77: */
78: public boolean validateTab() {
79: return true;
80: }
81:
82: /**
83: * Description of the Method
84: */
85: public void tabSelected() {
86: }
87:
88: /**
89: * Description of the Method
90: */
91: public void applyTab() {
92: //
93: passwords.apply();
94: }
95: }
|