001: package org.jacorb.poa.gui.poa;
002:
003: /*
004: * JacORB - a free Java ORB
005: *
006: * Copyright (C) 1997-2004 Gerald Brose.
007: *
008: * This library is free software; you can redistribute it and/or
009: * modify it under the terms of the GNU Library General Public
010: * License as published by the Free Software Foundation; either
011: * version 2 of the License, or (at your option) any later version.
012: *
013: * This library is distributed in the hope that it will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
016: * Library General Public License for more details.
017: *
018: * You should have received a copy of the GNU Library General Public
019: * License along with this library; if not, write to the Free
020: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
021: */
022:
023: /**
024: * @author Reimo Tiedemann, FU Berlin
025: * @version 1.0, 05/03/99, RT
026: */
027: public class POAStatePanel extends java.awt.Panel {
028: private AOMPanel ivjAOMPanel = null;
029: private PolicyPanel ivjPolicyPanel = null;
030: private QueuePanel ivjQueuePanel = null;
031: private StatePanel ivjStatePanel = null;
032: private TMPanel ivjTMPanel = null;
033:
034: AOMPanel _getAOMPanel() {
035: return getAOMPanel();
036: }
037:
038: /**
039: * Return the AOMPanel property value.
040: * @return org.jacorb.poa.gui.poa.AOMPanel
041: */
042: /* WARNING: THIS METHOD WILL BE REGENERATED. */
043: private AOMPanel getAOMPanel() {
044: if (ivjAOMPanel == null) {
045: try {
046: ivjAOMPanel = new org.jacorb.poa.gui.poa.AOMPanel();
047: ivjAOMPanel.setName("AOMPanel");
048: ivjAOMPanel.setLocation(10, 10);
049: // user code begin {1}
050: // user code end
051: } catch (java.lang.Throwable ivjExc) {
052: // user code begin {2}
053: // user code end
054: handleException(ivjExc);
055: }
056: }
057: ;
058: return ivjAOMPanel;
059: }
060:
061: PolicyPanel _getPolicyPanel() {
062: return getPolicyPanel();
063: }
064:
065: /**
066: * Return the PolicyPanel property value.
067: * @return org.jacorb.poa.gui.poa.PolicyPanel
068: */
069: /* WARNING: THIS METHOD WILL BE REGENERATED. */
070: private PolicyPanel getPolicyPanel() {
071: if (ivjPolicyPanel == null) {
072: try {
073: ivjPolicyPanel = new org.jacorb.poa.gui.poa.PolicyPanel();
074: ivjPolicyPanel.setName("PolicyPanel");
075: ivjPolicyPanel.setLocation(380, 70);
076: // user code begin {1}
077: // user code end
078: } catch (java.lang.Throwable ivjExc) {
079: // user code begin {2}
080: // user code end
081: handleException(ivjExc);
082: }
083: }
084: ;
085: return ivjPolicyPanel;
086: }
087:
088: QueuePanel _getQueuePanel() {
089: return getQueuePanel();
090: }
091:
092: /**
093: * Return the QueuePanel property value.
094: * @return org.jacorb.poa.gui.poa.QueuePanel
095: */
096: /* WARNING: THIS METHOD WILL BE REGENERATED. */
097: private QueuePanel getQueuePanel() {
098: if (ivjQueuePanel == null) {
099: try {
100: ivjQueuePanel = new org.jacorb.poa.gui.poa.QueuePanel();
101: ivjQueuePanel.setName("QueuePanel");
102: ivjQueuePanel.setLocation(110, 10);
103: // user code begin {1}
104: // user code end
105: } catch (java.lang.Throwable ivjExc) {
106: // user code begin {2}
107: // user code end
108: handleException(ivjExc);
109: }
110: }
111: ;
112: return ivjQueuePanel;
113: }
114:
115: StatePanel _getStatePanel() {
116: return getStatePanel();
117: }
118:
119: /**
120: * Return the StatePanel property value.
121: * @return org.jacorb.poa.gui.poa.StatePanel
122: */
123: /* WARNING: THIS METHOD WILL BE REGENERATED. */
124: private StatePanel getStatePanel() {
125: if (ivjStatePanel == null) {
126: try {
127: ivjStatePanel = new org.jacorb.poa.gui.poa.StatePanel();
128: ivjStatePanel.setName("StatePanel");
129: ivjStatePanel.setLocation(380, 10);
130: // user code begin {1}
131: // user code end
132: } catch (java.lang.Throwable ivjExc) {
133: // user code begin {2}
134: // user code end
135: handleException(ivjExc);
136: }
137: }
138: ;
139: return ivjStatePanel;
140: }
141:
142: TMPanel _getTMPanel() {
143: return getTMPanel();
144: }
145:
146: /**
147: * Return the TMPanel property value.
148: * @return org.jacorb.poa.gui.poa.TMPanel
149: */
150: /* WARNING: THIS METHOD WILL BE REGENERATED. */
151: private TMPanel getTMPanel() {
152: if (ivjTMPanel == null) {
153: try {
154: ivjTMPanel = new org.jacorb.poa.gui.poa.TMPanel();
155: ivjTMPanel.setName("TMPanel");
156: ivjTMPanel.setLocation(210, 10);
157: // user code begin {1}
158: // user code end
159: } catch (java.lang.Throwable ivjExc) {
160: // user code begin {2}
161: // user code end
162: handleException(ivjExc);
163: }
164: }
165: ;
166: return ivjTMPanel;
167: }
168:
169: /**
170: * Called whenever the part throws an exception.
171: * @param exception java.lang.Throwable
172: */
173: private void handleException(Throwable exception) {
174:
175: /* Uncomment the following lines to print uncaught exceptions to stdout */
176: // System.out.println("--------- UNCAUGHT EXCEPTION ---------");
177: // exception.printStackTrace(System.out);
178: }
179:
180: /**
181: * Initialize the class.
182: */
183: /* WARNING: THIS METHOD WILL BE REGENERATED. */
184: private void initialize() {
185: // user code begin {1}
186: // user code end
187: setName("POAStatePanel");
188: setLayout(null);
189: setBackground(java.awt.SystemColor.control);
190: setSize(690, 220);
191: add(getAOMPanel(), getAOMPanel().getName());
192: add(getQueuePanel(), getQueuePanel().getName());
193: add(getTMPanel(), getTMPanel().getName());
194: add(getPolicyPanel(), getPolicyPanel().getName());
195: add(getStatePanel(), getStatePanel().getName());
196: // user code begin {2}
197: // user code end
198: }
199:
200: /**
201: * POAStatePanel constructor comment.
202: * @param layout java.awt.LayoutManager
203: */
204: public POAStatePanel(java.awt.LayoutManager layout) {
205: super (layout);
206: }
207:
208: /**
209: * main entrypoint - starts the part when it is run as an application
210: * @param args java.lang.String[]
211: */
212: public static void main(java.lang.String[] args) {
213: try {
214: java.awt.Frame frame;
215: try {
216: Class aFrameClass = Class
217: .forName("com.ibm.uvm.abt.edit.TestFrame");
218: frame = (java.awt.Frame) aFrameClass.newInstance();
219: } catch (java.lang.Throwable ivjExc) {
220: frame = new java.awt.Frame();
221: }
222: POAStatePanel aPOAStatePanel;
223: aPOAStatePanel = new POAStatePanel();
224: frame.add("Center", aPOAStatePanel);
225: frame.setSize(aPOAStatePanel.getSize());
226: frame.setVisible(true);
227: } catch (Throwable exception) {
228: System.err
229: .println("Exception occurred in main() of java.awt.Panel");
230: exception.printStackTrace(System.out);
231: }
232: }
233:
234: /**
235: * Constructor
236: */
237: /* WARNING: THIS METHOD WILL BE REGENERATED. */
238: public POAStatePanel() {
239: super();
240: initialize();
241: }
242: }
|