Main Page | Packages | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

MURSelectDialog.java

00001 package GuiComponents.SctConf;
00002 
00003 import javax.swing.JDialog;
00004 import javax.swing.JLabel;
00005 import javax.swing.JTextField;
00006 import javax.swing.Box;
00007 
00008 import sctConf.*;
00009 
00010 public class MURSelectDialog extends JDialog {
00011     sctConf.Configuration config;
00012     Proxies.RodProxy myRod;
00013 
00014     Box box; //  = Box.createVerticalBox();
00015 
00016     JTextField murText;
00017     JTextField posText;
00018 
00019     MURSelectDialog(java.awt.Frame owner, Configuration conf) {
00020         super(owner, "Select MUR and position", true);
00021 
00022         config = conf;
00023 
00024         box = null;
00025         buildGUI();
00026     }
00027 
00028     void buildGUI() {
00029         if(box == null) {
00030             box = Box.createVerticalBox();
00031             getContentPane().add(box);
00032         }
00033 
00034         box.removeAll();
00035 
00036         box.add(new JLabel("" + myRod));
00037 
00038         box.add(new JLabel("MUR number:"));
00039         murText = new JTextField("0", 5);
00040         box.add(murText);
00041 
00042         box.add(new JLabel("Position in ROD (0-7):"));
00043         posText = new JTextField("0", 5);
00044         box.add(posText);
00045     }
00046 
00047     void setROD(Proxies.RodProxy newRod) {
00048         myRod = newRod;
00049         buildGUI();
00050     }
00051 
00052     int getMyPos() {
00053         return Short.parseShort(posText.getText());
00054     }
00055 
00056 //     String getMySN() {
00057 //         return "2022018000000";
00058 //     }
00059 
00060     int getMyMUR() {
00061         return Short.parseShort(murText.getText());
00062 
00063 // //             ConfigGui.Rod r = (ConfigGui.Rod)parent;
00064 //         try {
00065 //             int[] MURs = config.listMURSInRod(myRod.partition(), myRod.crate(), myRod.index());
00066 //             return MURs[0];
00067 //         } catch(ConfigurationException e) {
00068 //             System.out.println("No MURs in ROD? " + e.detail);
00069 //         }
00070 
00071 //         return 0;
00072     }
00073 }

Generated on Thu Jul 15 09:55:46 2004 for SCT DAQ/DCS Software - Java by doxygen 1.3.5