Changeset 27055 in osm
- Timestamp:
- 2011-11-14T11:13:57+01:00 (13 years ago)
- 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 30 30 } 31 31 }; 32 33 32 public JComboBox warningCatBox; 34 33 public EnumMap<Cat, Integer> warningCats = new EnumMap<Cat, Integer>(Cat.class); … … 42 41 } 43 42 }; 44 45 43 private ButtonGroup objButtons = new ButtonGroup(); 46 44 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 22 22 public void actionPerformed(java.awt.event.ActionEvent e) { 23 23 dlg.mark.setLightAtt(Att.GRP, 0, groupBox.getText()); 24 dlg.mark.paintSign(); 24 25 } 25 26 }; … … 29 30 public void actionPerformed(java.awt.event.ActionEvent e) { 30 31 dlg.mark.setLightAtt(Att.PER, 0, periodBox.getText()); 32 dlg.mark.paintSign(); 31 33 } 32 34 }; … … 36 38 public void actionPerformed(java.awt.event.ActionEvent e) { 37 39 dlg.mark.setLightAtt(Att.SEQ, 0, sequenceBox.getText()); 40 dlg.mark.paintSign(); 38 41 } 39 42 }; … … 55 58 public void actionPerformed(java.awt.event.ActionEvent e) { 56 59 dlg.mark.setLightAtt(Att.HGT, 0, heightBox.getText()); 60 dlg.mark.paintSign(); 57 61 } 58 62 }; … … 62 66 public void actionPerformed(java.awt.event.ActionEvent e) { 63 67 dlg.mark.setLightAtt(Att.RNG, 0, rangeBox.getText()); 68 dlg.mark.paintSign(); 64 69 } 65 70 }; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java
r27054 r27055 84 84 private ActionListener alType = new ActionListener() { 85 85 public void actionPerformed(java.awt.event.ActionEvent e) { 86 if (dlg.node == null)87 typeButtons.clearSelection();88 86 if (chanButton.isSelected()) { 89 87 chanButton.setBorderPainted(true); … … 131 129 private ActionListener alMisc = new ActionListener() { 132 130 public void actionPerformed(java.awt.event.ActionEvent e) { 133 if (dlg.mark == null) {134 miscButtons.clearSelection();135 }136 131 if (topButton.isSelected()) { 137 132 moreButton.setText("v v v"); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r27054 r27055 17 17 public SeaMark(OSeaMAction dia) { 18 18 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 }49 19 } 50 20 … … 1022 992 dlg.panelMain.saveButton.setEnabled(true); 1023 993 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)); 1026 995 dlg.panelMain.fogButton.setEnabled(true); 1027 996 dlg.panelMain.radButton.setEnabled(true); … … 1036 1005 dlg.manager.showVisualMessage("Seamark not recognised"); 1037 1006 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; 1038 1037 } 1039 1038 }
Note:
See TracChangeset
for help on using the changeset viewer.