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.GruntspudContext;
25: import gruntspud.ui.AbstractTab;
26: import gruntspud.ui.OptionsTab;
27:
28: import javax.swing.Icon;
29:
30: /**
31: * Abstract implementation of an <code>OptionsTab</code>
32: *
33: *@author magicthize
34: *@created 26 May 2002
35: */
36: public abstract class AbstractOptionsTab extends AbstractTab implements
37: OptionsTab {
38: private GruntspudContext context;
39:
40: /**
41: * Construct a new options tab
42: *
43: *@param title tab title
44: */
45: public AbstractOptionsTab(String title) {
46: super (title);
47: }
48:
49: /**
50: * Construct a new options tab
51: *
52: *@param title tab title
53: *@param icon tab icon
54: */
55: public AbstractOptionsTab(String title, Icon icon) {
56: super (title, icon);
57: }
58:
59: /**
60: * Invoked when tab is created
61: *
62: * @param context context
63: */
64: public void init(GruntspudContext context) {
65: this .context = context;
66: }
67:
68: /**
69: * Return the context
70: *
71: * @return context
72: */
73: public GruntspudContext getContext() {
74: return context;
75: }
76: }
|