ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/conient/uk/org/iscream/cms/conient/SwingSafeAddCard.java
Revision: 1.5
Committed: Sun Aug 1 10:40:07 2004 UTC (19 years, 9 months ago) by tdb
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +3 -3 lines
Error occurred while calculating annotation data.
Log Message:
Catch a lot of old URL's and update them. Also remove a couple of old files
that aren't used.

File Contents

# Content
1 /*
2 * i-scream central monitoring system
3 * http://www.i-scream.org
4 * Copyright (C) 2000-2002 i-scream
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21 //---PACKAGE DECLARATION---
22 package uk.org.iscream.cms.conient;
23
24 //---IMPORTS---
25 import javax.swing.JComponent;
26 import java.awt.Container;
27
28 /**
29 * Allows components to be safely added to a pane using a card layout.
30 * This class takes a container and a component to add
31 * to the pane. It then should be added to the
32 * Swing Event Dispatching Thread in order that the
33 * add can carry out.
34 *
35 * @author $Author: tdb $
36 * @version $Id: SwingSafeAddCard.java,v 1.4 2002/05/21 16:47:10 tdb Exp $
37 */
38 public class SwingSafeAddCard implements Runnable {
39
40 //---FINAL ATTRIBUTES---
41
42 /**
43 * The current CVS revision of this class
44 */
45 public static final String REVISION = "$Revision: 1.4 $";
46
47 //---STATIC METHODS---
48
49 //---CONSTRUCTORS---
50
51 /**
52 * Constructs a new instance.
53 *
54 * @param container the container pane to add the component to
55 * @param component the component to be added to the container
56 * @param title the title for the card
57 */
58 public SwingSafeAddCard(Container container, JComponent component, String title) {
59 _container = container;
60 _component = component;
61 _title = title;
62 }
63
64 //---PUBLIC METHODS---
65
66 /**
67 * Executed by the Swing Event Dispatch thread
68 * to update the display.
69 */
70 public void run() {
71 _container.add( _component, _title);
72 }
73
74 //---PRIVATE METHODS---
75
76 //---ACCESSOR/MUTATOR METHODS---
77
78 //---ATTRIBUTES---
79
80 /**
81 * The component to add
82 */
83 private JComponent _component;
84
85 /**
86 * The container to add the component to
87 */
88 private Container _container;
89
90 /**
91 * The title of the tab
92 */
93 private String _title;
94
95 //---STATIC ATTRIBUTES---
96
97 }