1 package org.jacorb.poa.gui.poa; 2 3 22 23 import org.jacorb.poa.gui.beans.FillLevelBar; 24 25 29 public class QueuePanel extends java.awt.Panel implements java.awt.event.ActionListener { 30 private DetailsButtonController controller; 31 private java.awt.Button ivjDetailsButton = null; 32 private org.jacorb.poa.gui.beans.FillLevelBar ivjFillLevelBar = null; 33 private java.awt.Label ivjLabel1 = null; 34 private java.awt.Label ivjLabel2 = null; 35 38 private void _actionDetailsButtonPressed() { 39 if (controller != null) { 40 controller._actionDetailsButtonPressed("queue"); 41 } 42 } 43 47 48 public void actionPerformed(java.awt.event.ActionEvent e) { 49 if ((e.getSource() == getDetailsButton()) ) { 52 connEtoC1(e); 53 } 54 } 57 61 62 private void connEtoC1(java.awt.event.ActionEvent arg1) { 63 try { 64 this._actionDetailsButtonPressed(); 67 } catch (java.lang.Throwable ivjExc) { 70 handleException(ivjExc); 73 } 74 } 75 79 80 private java.awt.Button getDetailsButton() { 81 if (ivjDetailsButton == null) { 82 try { 83 ivjDetailsButton = new java.awt.Button (); 84 ivjDetailsButton.setName("DetailsButton"); 85 ivjDetailsButton.setLocation(33, 170); 86 ivjDetailsButton.setBackground(java.awt.SystemColor.control); 87 ivjDetailsButton.setSize(23, 23); 88 ivjDetailsButton.setFont(new java.awt.Font ("dialog", 0, 8)); 89 ivjDetailsButton.setActionCommand("..."); 90 ivjDetailsButton.setLabel("..."); 91 } catch (java.lang.Throwable ivjExc) { 94 handleException(ivjExc); 97 } 98 }; 99 return ivjDetailsButton; 100 } 101 105 106 private org.jacorb.poa.gui.beans.FillLevelBar getFillLevelBar() { 107 if (ivjFillLevelBar == null) { 108 try { 109 ivjFillLevelBar = new org.jacorb.poa.gui.beans.FillLevelBar(); 110 ivjFillLevelBar.setName("FillLevelBar"); 111 ivjFillLevelBar.setLocation(32, 35); 112 ivjFillLevelBar.setBackground(java.awt.SystemColor.control); 113 ivjFillLevelBar.setSize(50, 130); 114 } catch (java.lang.Throwable ivjExc) { 117 handleException(ivjExc); 120 } 121 }; 122 return ivjFillLevelBar; 123 } 124 128 129 private java.awt.Label getLabel1() { 130 if (ivjLabel1 == null) { 131 try { 132 ivjLabel1 = new java.awt.Label (); 133 ivjLabel1.setName("Label1"); 134 ivjLabel1.setLocation(10, 10); 135 ivjLabel1.setText("Queue"); 136 ivjLabel1.setBackground(java.awt.SystemColor.control); 137 ivjLabel1.setSize(70, 12); 138 ivjLabel1.setForeground(java.awt.Color.black); 139 ivjLabel1.setFont(new java.awt.Font ("dialog", 2, 10)); 140 ivjLabel1.setAlignment(1); 141 } catch (java.lang.Throwable ivjExc) { 144 handleException(ivjExc); 147 } 148 }; 149 return ivjLabel1; 150 } 151 155 156 private java.awt.Label getLabel2() { 157 if (ivjLabel2 == null) { 158 try { 159 ivjLabel2 = new java.awt.Label (); 160 ivjLabel2.setName("Label2"); 161 ivjLabel2.setLocation(10, 22); 162 ivjLabel2.setText(""); 163 ivjLabel2.setBackground(java.awt.SystemColor.control); 164 ivjLabel2.setSize(70, 12); 165 ivjLabel2.setForeground(java.awt.Color.black); 166 ivjLabel2.setFont(new java.awt.Font ("dialog", 2, 10)); 167 ivjLabel2.setAlignment(1); 168 } catch (java.lang.Throwable ivjExc) { 171 handleException(ivjExc); 174 } 175 }; 176 return ivjLabel2; 177 } 178 FillLevelBar _getQueueBar() { 179 return getFillLevelBar(); 180 } 181 185 private void handleException(Throwable exception) { 186 187 188 } 191 194 195 private void initConnections() { 196 getDetailsButton().addActionListener(this); 199 } 200 203 204 private void initialize() { 205 setName("QueuePanel"); 208 setLayout(null); 209 setBackground(java.awt.SystemColor.control); 210 setSize(90, 200); 211 add(getLabel1(), getLabel1().getName()); 212 add(getLabel2(), getLabel2().getName()); 213 add(getFillLevelBar(), getFillLevelBar().getName()); 214 add(getDetailsButton(), getDetailsButton().getName()); 215 initConnections(); 216 } 219 void _init(DetailsButtonController _controller) { 220 controller = _controller; 221 } 222 226 public QueuePanel(java.awt.LayoutManager layout) { 227 super(layout); 228 } 229 233 public static void main(java.lang.String [] args) { 234 try { 235 java.awt.Frame frame; 236 try { 237 Class aFrameClass = Class.forName("com.ibm.uvm.abt.edit.TestFrame"); 238 frame = (java.awt.Frame )aFrameClass.newInstance(); 239 } catch (java.lang.Throwable ivjExc) { 240 frame = new java.awt.Frame (); 241 } 242 QueuePanel aQueuePanel; 243 aQueuePanel = new QueuePanel(); 244 frame.add("Center", aQueuePanel); 245 frame.setSize(aQueuePanel.getSize()); 246 frame.setVisible(true); 247 } catch (Throwable exception) { 248 System.err.println("Exception occurred in main() of java.awt.Panel"); 249 exception.printStackTrace(System.out); 250 } 251 } 252 public void paint(java.awt.Graphics g) { 253 g.setColor(getBackground()); 254 g.fill3DRect(0, 0, getBounds().width, getBounds().height, true); 255 } 256 259 260 public QueuePanel() { 261 super(); 262 initialize(); 263 } 264 } 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | Popular Tags |