Ignore:
Timestamp:
2011-11-14T11:13:57+01:00 (13 years ago)
Author:
malcolmh
Message:

save

Location:
applications/editors/josm/plugins/smed/plugs/oseam/src
Files:
10 added
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLights.java

    r27054 r27055  
    3030                }
    3131        };
    32 
    3332        public JComboBox warningCatBox;
    3433        public EnumMap<Cat, Integer> warningCats = new EnumMap<Cat, Integer>(Cat.class);
     
    4241                }
    4342        };
    44 
    4543        private ButtonGroup objButtons = new ButtonGroup();
    4644        public JRadioButton houseButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/LighthouseButton.png")));
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLit.java

    r27043 r27055  
    2222                public void actionPerformed(java.awt.event.ActionEvent e) {
    2323                        dlg.mark.setLightAtt(Att.GRP, 0, groupBox.getText());
     24                        dlg.mark.paintSign();
    2425                }
    2526        };
     
    2930                public void actionPerformed(java.awt.event.ActionEvent e) {
    3031                        dlg.mark.setLightAtt(Att.PER, 0, periodBox.getText());
     32                        dlg.mark.paintSign();
    3133                }
    3234        };
     
    3638                public void actionPerformed(java.awt.event.ActionEvent e) {
    3739                        dlg.mark.setLightAtt(Att.SEQ, 0, sequenceBox.getText());
     40                        dlg.mark.paintSign();
    3841                }
    3942        };
     
    5558                public void actionPerformed(java.awt.event.ActionEvent e) {
    5659                        dlg.mark.setLightAtt(Att.HGT, 0, heightBox.getText());
     60                        dlg.mark.paintSign();
    5761                }
    5862        };
     
    6266                public void actionPerformed(java.awt.event.ActionEvent e) {
    6367                        dlg.mark.setLightAtt(Att.RNG, 0, rangeBox.getText());
     68                        dlg.mark.paintSign();
    6469                }
    6570        };
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java

    r27054 r27055  
    8484        private ActionListener alType = new ActionListener() {
    8585                public void actionPerformed(java.awt.event.ActionEvent e) {
    86                         if (dlg.node == null)
    87                                 typeButtons.clearSelection();
    8886                        if (chanButton.isSelected()) {
    8987                                chanButton.setBorderPainted(true);
     
    131129        private ActionListener alMisc = new ActionListener() {
    132130                public void actionPerformed(java.awt.event.ActionEvent e) {
    133                         if (dlg.mark == null) {
    134                                 miscButtons.clearSelection();
    135                         }
    136131                        if (topButton.isSelected()) {
    137132                                moreButton.setText("v v v");
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java

    r27054 r27055  
    1717        public SeaMark(OSeaMAction dia) {
    1818                dlg = dia;
    19         }
    20 
    21         public void clearSign() {
    22                 setObject(Obj.UNKNOWN);
    23                 setCategory(Cat.NONE);
    24                 setShape(Shp.UNKNOWN);
    25                 setColour(Ent.BODY, Col.UNKNOWN);
    26                 setPattern(Ent.BODY, Pat.NONE);
    27                 setColour(Ent.TOPMARK, Col.UNKNOWN);
    28                 setPattern(Ent.TOPMARK, Pat.NONE);
    29                 dlg.panelMain.moreButton.setVisible(false);
    30                 dlg.panelMain.saveButton.setEnabled(false);
    31                 dlg.panelMain.topButton.setEnabled(false);
    32                 dlg.panelMain.fogButton.setEnabled(false);
    33                 dlg.panelMain.radButton.setEnabled(false);
    34                 dlg.panelMain.litButton.setEnabled(false);
    35                 dlg.panelMain.panelMore.syncPanel();
    36                 dlg.panelMain.panelMore.setVisible(false);
    37                 paintSign();
    38         }
    39        
    40         public String validDecimal(String str) {
    41                 str = str.trim().replace(',', '.');
    42                 if ((!str.isEmpty()) && (!str.matches("^[+-]??\\d+(\\.\\d+)??$"))) {
    43                         dlg.manager.showVisualMessage("Not a valid decimal string");
    44                         return "";
    45                 } else {
    46                         dlg.manager.showVisualMessage("");
    47                         return str;
    48                 }
    4919        }
    5020
     
    1022992                        dlg.panelMain.saveButton.setEnabled(true);
    1023993                        Ent ent = EntMAP.get(getObject());
    1024                         if ((ent == Ent.BUOY) || (ent == Ent.BEACON) || (ent == Ent.FLOAT))
    1025                                 dlg.panelMain.topButton.setEnabled(true);
     994                        dlg.panelMain.topButton.setEnabled((ent == Ent.BUOY) || (ent == Ent.BEACON) || (ent == Ent.FLOAT));
    1026995                        dlg.panelMain.fogButton.setEnabled(true);
    1027996                        dlg.panelMain.radButton.setEnabled(true);
     
    10361005                        dlg.manager.showVisualMessage("Seamark not recognised");
    10371006                        return false;
     1007                }
     1008        }
     1009
     1010        public void clearSign() {
     1011                setObject(Obj.UNKNOWN);
     1012                setCategory(Cat.NONE);
     1013                setShape(Shp.UNKNOWN);
     1014                setColour(Ent.BODY, Col.UNKNOWN);
     1015                setPattern(Ent.BODY, Pat.NONE);
     1016                setColour(Ent.TOPMARK, Col.UNKNOWN);
     1017                setPattern(Ent.TOPMARK, Pat.NONE);
     1018                dlg.panelMain.moreButton.setVisible(false);
     1019                dlg.panelMain.saveButton.setEnabled(false);
     1020                dlg.panelMain.topButton.setEnabled(false);
     1021                dlg.panelMain.fogButton.setEnabled(false);
     1022                dlg.panelMain.radButton.setEnabled(false);
     1023                dlg.panelMain.litButton.setEnabled(false);
     1024                dlg.panelMain.panelMore.syncPanel();
     1025                dlg.panelMain.panelMore.setVisible(false);
     1026                paintSign();
     1027        }
     1028       
     1029        public String validDecimal(String str) {
     1030                str = str.trim().replace(',', '.');
     1031                if ((!str.isEmpty()) && (!str.matches("^[+-]??\\d+(\\.\\d+)??$"))) {
     1032                        dlg.manager.showVisualMessage("Not a valid decimal string");
     1033                        return "";
     1034                } else {
     1035                        dlg.manager.showVisualMessage("");
     1036                        return str;
    10381037                }
    10391038        }
Note: See TracChangeset for help on using the changeset viewer.