Ignore:
Timestamp:
2010-09-09T16:25:18+02:00 (15 years ago)
Author:
malcolmh
Message:

started lights

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java

    r23078 r23086  
    153153        public JTextField tfM01Height = null;
    154154        public JLabel lM01Range = null;
     155        public JTextField tfM01Range = null;
    155156        public JLabel lM01Group = null;
    156157        public JTextField tfM01Group = null;
     
    165166        public JTextField tfM02Bearing = null;
    166167        public JTextField tfM01Radius = null;
    167         public JTextField tfM01Range = null;
    168168        public JButton bM01Save = null;
    169169        public JButton bM01Close = null;
     
    662662                        ActionListener alM01Fired = new ActionListener() {
    663663                                public void actionPerformed(java.awt.event.ActionEvent e) {
     664                                        buoy.setSectored(rbM01FiredN.isSelected());
    664665                                        buoy.paintSign();
    665666                                }
     
    865866                                                return;
    866867                                        }
    867                                         if (cat == 0)
    868                                                 return;
    869868
    870869                                        Node n = buoy.getNode();
     
    10351034                        tfM01Racon.addFocusListener(new FocusAdapter() {
    10361035                                public void focusLost(FocusEvent e) {
    1037                                         buoy.setRaconGroup(tfM01Racon.getText());
     1036                                        buoy.setRaconGroup(tfM01Racon.getText().trim());
    10381037                                }
    10391038                        });
     
    10911090                        tfM01FogGroup.addFocusListener(new FocusAdapter() {
    10921091                                public void focusLost(FocusEvent e) {
    1093                                         buoy.setFogGroup(tfM01FogGroup.getText());
     1092                                        buoy.setFogGroup(tfM01FogGroup.getText().trim());
    10941093                                }
    10951094                        });
     
    11041103                        tfM01FogPeriod.addFocusListener(new FocusAdapter() {
    11051104                                public void focusLost(FocusEvent e) {
    1106                                         buoy.setFogPeriod(tfM01FogPeriod.getText());
     1105                                        buoy.setFogPeriod(tfM01FogPeriod.getText().trim());
    11071106                                }
    11081107                        });
     
    11861185                        tfM01Height.addFocusListener(new FocusAdapter() {
    11871186                                public void focusLost(FocusEvent e) {
    1188                                         buoy.setName(tfM01Height.getText());
     1187                                        buoy.setName(tfM01Height.getText().trim());
    11891188                                }
    11901189                        });
     
    11991198                        tfM01Range.addFocusListener(new FocusAdapter() {
    12001199                                public void focusLost(FocusEvent e) {
    1201                                         buoy.setName(tfM01Range.getText());
     1200                                        buoy.setName(tfM01Range.getText().trim());
    12021201                                }
    12031202                        });
     
    12121211                        tfM01Group.addFocusListener(new FocusAdapter() {
    12131212                                public void focusLost(FocusEvent e) {
    1214                                         buoy.setLightGroup(tfM01Group.getText());
     1213                                        buoy.setLightGroup(tfM01Group.getText().trim());
     1214                                        buoy.paintSign();
    12151215                                }
    12161216                        });
     
    12251225                        tfM01RepeatTime.addActionListener(new ActionListener() {
    12261226                                public void actionPerformed(ActionEvent e) {
    1227                                         String s = tfM01RepeatTime.getText();
    1228 
    1229                                         buoy.setLightPeriod(s);
     1227                                        buoy.setLightPeriod(tfM01RepeatTime.getText().trim());
    12301228                                        buoy.paintSign();
    12311229                                }
     
    12341232                        tfM01RepeatTime.addFocusListener(new FocusAdapter() {
    12351233                                public void focusLost(FocusEvent e) {
    1236                                         String s = tfM01RepeatTime.getText();
    1237 
    1238                                         buoy.setLightPeriod(s);
    1239                                         buoy.paintSign();
    1240                                 }
    1241                         });
    1242                 }
    1243 
     1234                                        buoy.setLightPeriod(tfM01RepeatTime.getText().trim());
     1235                                        buoy.paintSign();
     1236                                }
     1237                        });
     1238                }
    12441239                return tfM01RepeatTime;
    12451240        }
     
    12501245                        cbM01Colour.setBounds(new Rectangle(165, 295, 40, 20));
    12511246                        cbM01Colour.setFont(new Font("Dialog", Font.PLAIN, 12)); //$NON-NLS-1$
     1247                        cbM01Colour.addItem(""); //$NON-NLS-1$
    12521248                        cbM01Colour.addItem(Messages.getString("SmpDialogAction.190")); //$NON-NLS-1$
    12531249                        cbM01Colour.addItem(Messages.getString("SmpDialogAction.191")); //$NON-NLS-1$
     
    12551251                        cbM01Colour.addActionListener(new ActionListener() {
    12561252                                public void actionPerformed(ActionEvent e) {
    1257                                         int col = cbM01Colour.getSelectedIndex();
     1253                                        buoy.setLightColour((String)cbM01Colour.getSelectedItem());
     1254                                        buoy.paintSign();
    12581255                                }
    12591256                        });
     
    12921289                        tfM01Bearing.addFocusListener(new FocusAdapter() {
    12931290                                public void focusLost(FocusEvent e) {
    1294                                         buoy.setName(tfM01Bearing.getText());
     1291//                                      buoy.setName(tfM01Bearing.getText());
    12951292                                }
    12961293                        });
     
    13051302                        tfM02Bearing.addFocusListener(new FocusAdapter() {
    13061303                                public void focusLost(FocusEvent e) {
    1307                                         buoy.setName(tfM02Bearing.getText());
     1304//                                      buoy.setName(tfM02Bearing.getText());
    13081305                                }
    13091306                        });
     
    13181315                        tfM01Radius.addFocusListener(new FocusAdapter() {
    13191316                                public void focusLost(FocusEvent e) {
    1320                                         buoy.setName(tfM01Radius.getText());
     1317//                                      buoy.setName(tfM01Radius.getText());
    13211318                                }
    13221319                        });
     
    13291326                        bM01Close = new JButton();
    13301327                        bM01Close.setBounds(new Rectangle(20, 325, 110, 20));
    1331                         bM01Close.setText(tr("close"));
     1328                        bM01Close.setText(tr("Close"));
    13321329                        bM01Close.addActionListener(new ActionListener() {
    13331330                                public void actionPerformed(ActionEvent e) {
     
    13531350                        bM01Save = new JButton();
    13541351                        bM01Save.setBounds(new Rectangle(150, 325, 110, 20));
    1355                         bM01Save.setText(tr("save"));
     1352                        bM01Save.setText(tr("Save"));
    13561353                        bM01Save.setEnabled(false);
    13571354
Note: See TracChangeset for help on using the changeset viewer.