KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > poa > gui > beans > DoubleListHeaderPanel


1 package org.jacorb.poa.gui.beans;
2
3 /*
4  * JacORB - a free Java ORB
5  *
6  * Copyright (C) 1997-2004 Gerald Brose.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the Free
20  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  */

22  
23 /**
24  * @author Reimo Tiedemann, FU Berlin
25  * @version 1.0, 05/10/99
26  * @see org.jacorb.poa.gui.beans.DoubleListDialog
27  */

28 public class DoubleListHeaderPanel extends java.awt.Panel JavaDoc {
29     private java.awt.Label JavaDoc ivjHeaderLabel1 = null;
30     private java.awt.Label JavaDoc ivjHeaderLabel2 = null;
31 /**
32  * Constructor
33  */

34 /* WARNING: THIS METHOD WILL BE REGENERATED. */
35 public DoubleListHeaderPanel() {
36     super();
37     initialize();
38 }
39 /**
40  * DoubleListTitlePanel constructor comment.
41  * @param layout java.awt.LayoutManager
42  */

43 public DoubleListHeaderPanel(java.awt.LayoutManager JavaDoc layout) {
44     super(layout);
45 }
46 java.awt.Label JavaDoc _getHeaderLabel1() {
47     return getHeaderLabel1();
48 }
49 java.awt.Label JavaDoc _getHeaderLabel2() {
50     return getHeaderLabel2();
51 }
52 /**
53  * Return the Label1 property value.
54  * @return java.awt.Label
55  */

56 /* WARNING: THIS METHOD WILL BE REGENERATED. */
57 private java.awt.Label JavaDoc getHeaderLabel1() {
58     if (ivjHeaderLabel1 == null) {
59         try {
60             ivjHeaderLabel1 = new java.awt.Label JavaDoc();
61             ivjHeaderLabel1.setName("HeaderLabel1");
62             ivjHeaderLabel1.setAlignment(java.awt.Label.LEFT);
63             ivjHeaderLabel1.setFont(new java.awt.Font JavaDoc("dialog", 2, 10));
64             ivjHeaderLabel1.setText("Label1");
65             ivjHeaderLabel1.setBackground(java.awt.SystemColor.control);
66             ivjHeaderLabel1.setBounds(10, 0, 180, 20);
67             // user code begin {1}
68
// user code end
69
} catch (java.lang.Throwable JavaDoc ivjExc) {
70             // user code begin {2}
71
// user code end
72
handleException(ivjExc);
73         }
74     };
75     return ivjHeaderLabel1;
76 }
77 /**
78  * Return the Label2 property value.
79  * @return java.awt.Label
80  */

81 /* WARNING: THIS METHOD WILL BE REGENERATED. */
82 private java.awt.Label JavaDoc getHeaderLabel2() {
83     if (ivjHeaderLabel2 == null) {
84         try {
85             ivjHeaderLabel2 = new java.awt.Label JavaDoc();
86             ivjHeaderLabel2.setName("HeaderLabel2");
87             ivjHeaderLabel2.setAlignment(java.awt.Label.LEFT);
88             ivjHeaderLabel2.setFont(new java.awt.Font JavaDoc("dialog", 2, 10));
89             ivjHeaderLabel2.setText("Label2");
90             ivjHeaderLabel2.setBackground(java.awt.SystemColor.control);
91             ivjHeaderLabel2.setBounds(200, 0, 190, 20);
92             // user code begin {1}
93
// user code end
94
} catch (java.lang.Throwable JavaDoc ivjExc) {
95             // user code begin {2}
96
// user code end
97
handleException(ivjExc);
98         }
99     };
100     return ivjHeaderLabel2;
101 }
102 /**
103  * Called whenever the part throws an exception.
104  * @param exception java.lang.Throwable
105  */

106 private void handleException(Throwable JavaDoc exception) {
107
108     /* Uncomment the following lines to print uncaught exceptions to stdout */
109     // System.out.println("--------- UNCAUGHT EXCEPTION ---------");
110
// exception.printStackTrace(System.out);
111
}
112 /**
113  * Initialize the class.
114  */

115 /* WARNING: THIS METHOD WILL BE REGENERATED. */
116 private void initialize() {
117     // user code begin {1}
118
// user code end
119
setName("DoubleListTitlePanel");
120     setLayout(null);
121     setBackground(java.awt.SystemColor.control);
122     setSize(400, 20);
123     add(getHeaderLabel1(), getHeaderLabel1().getName());
124     add(getHeaderLabel2(), getHeaderLabel2().getName());
125     // user code begin {2}
126
// user code end
127
}
128 /**
129  * main entrypoint - starts the part when it is run as an application
130  * @param args java.lang.String[]
131  */

132 public static void main(java.lang.String JavaDoc[] args) {
133     try {
134         java.awt.Frame JavaDoc frame;
135         try {
136             Class JavaDoc aFrameClass = Class.forName("com.ibm.uvm.abt.edit.TestFrame");
137             frame = (java.awt.Frame JavaDoc)aFrameClass.newInstance();
138         } catch (java.lang.Throwable JavaDoc ivjExc) {
139             frame = new java.awt.Frame JavaDoc();
140         }
141         DoubleListHeaderPanel aDoubleListHeaderPanel;
142         aDoubleListHeaderPanel = new DoubleListHeaderPanel();
143         frame.add("Center", aDoubleListHeaderPanel);
144         frame.setSize(aDoubleListHeaderPanel.getSize());
145         frame.setVisible(true);
146     } catch (Throwable JavaDoc exception) {
147         System.err.println("Exception occurred in main() of java.awt.Panel");
148         exception.printStackTrace(System.out);
149     }
150 }
151
152 }
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
Popular Tags