1 package org.jacorb.poa.gui.poa; 2 3 22 23 import org.jacorb.poa.gui.beans.FillLevelBar; 24 25 29 public class AOMPanel extends java.awt.Panel implements java.awt.event.ActionListener { 30 private DetailsButtonController controller; 31 32 private java.awt.Button ivjDetailsButton = null; 33 private org.jacorb.poa.gui.beans.FillLevelBar ivjFillLevelBar = null; 34 private java.awt.Label ivjLabel1 = null; 35 private java.awt.Label ivjLabel2 = null; 36 39 private void _actionDetailsButtonPressed() { 40 if (controller != null) { 41 controller._actionDetailsButtonPressed("aom"); 42 } 43 } 44 48 49 public void actionPerformed(java.awt.event.ActionEvent e) { 50 if ((e.getSource() == getDetailsButton()) ) { 53 connEtoC1(e); 54 } 55 } 58 62 63 private void connEtoC1(java.awt.event.ActionEvent arg1) { 64 try { 65 this._actionDetailsButtonPressed(); 68 } catch (java.lang.Throwable ivjExc) { 71 handleException(ivjExc); 74 } 75 } 76 FillLevelBar _getAOMBar() { 77 return getFillLevelBar(); 78 } 79 83 84 private java.awt.Button getDetailsButton() { 85 if (ivjDetailsButton == null) { 86 try { 87 ivjDetailsButton = new java.awt.Button (); 88 ivjDetailsButton.setName("DetailsButton"); 89 ivjDetailsButton.setLocation(33, 170); 90 ivjDetailsButton.setBackground(java.awt.SystemColor.control); 91 ivjDetailsButton.setSize(23, 23); 92 ivjDetailsButton.setFont(new java.awt.Font ("dialog", 0, 8)); 93 ivjDetailsButton.setActionCommand("..."); 94 ivjDetailsButton.setLabel("..."); 95 } catch (java.lang.Throwable ivjExc) { 98 handleException(ivjExc); 101 } 102 }; 103 return ivjDetailsButton; 104 } 105 109 110 private org.jacorb.poa.gui.beans.FillLevelBar getFillLevelBar() { 111 if (ivjFillLevelBar == null) { 112 try { 113 ivjFillLevelBar = new org.jacorb.poa.gui.beans.FillLevelBar(); 114 ivjFillLevelBar.setName("FillLevelBar"); 115 ivjFillLevelBar.setLocation(32, 35); 116 ivjFillLevelBar.setBackground(java.awt.SystemColor.control); 117 ivjFillLevelBar.setSize(50, 130); 118 } catch (java.lang.Throwable ivjExc) { 121 handleException(ivjExc); 124 } 125 }; 126 return ivjFillLevelBar; 127 } 128 132 133 private java.awt.Label getLabel1() { 134 if (ivjLabel1 == null) { 135 try { 136 ivjLabel1 = new java.awt.Label (); 137 ivjLabel1.setName("Label1"); 138 ivjLabel1.setLocation(10, 10); 139 ivjLabel1.setText("Active Object"); 140 ivjLabel1.setBackground(java.awt.SystemColor.control); 141 ivjLabel1.setSize(70, 12); 142 ivjLabel1.setForeground(java.awt.Color.black); 143 ivjLabel1.setFont(new java.awt.Font ("dialog", 2, 10)); 144 ivjLabel1.setAlignment(1); 145 } catch (java.lang.Throwable ivjExc) { 148 handleException(ivjExc); 151 } 152 }; 153 return ivjLabel1; 154 } 155 159 160 private java.awt.Label getLabel2() { 161 if (ivjLabel2 == null) { 162 try { 163 ivjLabel2 = new java.awt.Label (); 164 ivjLabel2.setName("Label2"); 165 ivjLabel2.setLocation(10, 22); 166 ivjLabel2.setText("Map"); 167 ivjLabel2.setBackground(java.awt.SystemColor.control); 168 ivjLabel2.setSize(70, 12); 169 ivjLabel2.setForeground(java.awt.Color.black); 170 ivjLabel2.setFont(new java.awt.Font ("dialog", 2, 10)); 171 ivjLabel2.setAlignment(1); 172 } catch (java.lang.Throwable ivjExc) { 175 handleException(ivjExc); 178 } 179 }; 180 return ivjLabel2; 181 } 182 186 private void handleException(Throwable exception) { 187 188 189 } 192 195 196 private void initConnections() { 197 getDetailsButton().addActionListener(this); 200 } 201 204 205 private void initialize() { 206 setName("AOMPanel"); 209 setLayout(null); 210 setBackground(java.awt.SystemColor.control); 211 setSize(90, 200); 212 add(getLabel1(), getLabel1().getName()); 213 add(getLabel2(), getLabel2().getName()); 214 add(getFillLevelBar(), getFillLevelBar().getName()); 215 add(getDetailsButton(), getDetailsButton().getName()); 216 initConnections(); 217 } 220 void _init(DetailsButtonController _controller) { 221 controller = _controller; 222 } 223 227 public AOMPanel(java.awt.LayoutManager layout) { 228 super(layout); 229 } 230 234 public static void main(java.lang.String [] args) { 235 try { 236 java.awt.Frame frame; 237 try { 238 Class aFrameClass = Class.forName("com.ibm.uvm.abt.edit.TestFrame"); 239 frame = (java.awt.Frame )aFrameClass.newInstance(); 240 } catch (java.lang.Throwable ivjExc) { 241 frame = new java.awt.Frame (); 242 } 243 AOMPanel aAOMPanel; 244 aAOMPanel = new AOMPanel(); 245 frame.add("Center", aAOMPanel); 246 frame.setSize(aAOMPanel.getSize()); 247 frame.setVisible(true); 248 } catch (Throwable exception) { 249 System.err.println("Exception occurred in main() of java.awt.Panel"); 250 exception.printStackTrace(System.out); 251 } 252 } 253 public void paint(java.awt.Graphics g) { 254 g.setColor(getBackground()); 255 g.fill3DRect(0, 0, getBounds().width, getBounds().height, true); 256 } 257 260 261 public AOMPanel() { 262 super(); 263 initialize(); 264 } 265 } 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | Popular Tags |