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;
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
00057
00058
00059
00060 int getMyMUR() {
00061 return Short.parseShort(murText.getText());
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 }
00073 }