Changeset 27151 in osm for applications/editors/josm/plugins/smed
- Timestamp:
- 2011-11-25T16:17:53+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages.properties
r27131 r27151 277 277 Windmill=Windmill 278 278 SpireMinaret=Spire/Minaret 279 280 NotDecimal=Not a valid decimal string 281 TooBig=Maximum value exceeded -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_de.properties
r27131 r27151 277 277 Windmill=Windmill 278 278 SpireMinaret=Spire/Minaret 279 280 NotDecimal=Not a valid decimal string 281 TooBig=Maximum value exceeded -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_en.properties
r27131 r27151 277 277 Windmill=Windmill 278 278 SpireMinaret=Spire/Minaret 279 280 NotDecimal=Not a valid decimal string 281 TooBig=Maximum value exceeded -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java
r27054 r27151 183 183 case 10: 184 184 case 11: 185 dlg.mark.setLightAtt(col - 1, row, dlg.mark.validDecimal((String) value));185 dlg.mark.setLightAtt(col - 1, row, value); 186 186 break; 187 187 case 6: 188 188 if ((Boolean) value == true) { 189 189 dlg.mark.setLightAtt(Att.LIT, row, Lit.DIR); 190 dlg.mark.setLightAtt(Att.BEG, row, ""); 191 dlg.mark.setLightAtt(Att.END, row, ""); 190 192 } else { 191 193 dlg.mark.setLightAtt(Att.LIT, row, Lit.UNKNOWN); … … 196 198 case 8: 197 199 if (dlg.mark.getLightAtt(Att.LIT, row) == Lit.DIR) { 198 dlg.mark.setLightAtt(Att.ORT, row, dlg.mark.validDecimal((String) value));200 dlg.mark.setLightAtt(Att.ORT, row, value); 199 201 } else { 200 dlg.mark.setLightAtt(Att.LIT, row, Lit.UNKNOWN); 201 dlg.mark.setLightAtt(col - 1, row, dlg.mark.validDecimal((String) value)); 202 dlg.mark.setLightAtt(col - 1, row, value); 202 203 } 203 204 break; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r27146 r27151 9 9 import org.openstreetmap.josm.command.ChangePropertyCommand; 10 10 11 import oseam.Messages; 11 12 import oseam.dialogs.OSeaMAction; 12 13 … … 1091 1092 public String validDecimal(String str) { 1092 1093 str = str.trim().replace(',', '.'); 1093 if ( (!str.isEmpty()) && (!str.matches("^[+-]??\\d+(\\.\\d+)??$"))) {1094 dlg.manager.showVisualMessage( "Not a valid decimal string");1094 if (!(str.isEmpty()) && !(str.matches("^[+-]??\\d+(\\.\\d+)??$"))) { 1095 dlg.manager.showVisualMessage(Messages.getString("NotDecimal")); 1095 1096 return ""; 1096 1097 } else { … … 1100 1101 } 1101 1102 1102 public String validDecimal(String str, int max) {1103 public String validDecimal(String str, float max) { 1103 1104 str = validDecimal(str); 1104 if (!(str.isEmpty()) && (new Integer(str) > max)) {1105 dlg.manager.showVisualMessage( "Maximum value exceeded");1105 if (!(str.isEmpty()) && (new Float(str) > max)) { 1106 dlg.manager.showVisualMessage(Messages.getString("TooBig")); 1106 1107 return ""; 1107 1108 } else {
Note:
See TracChangeset
for help on using the changeset viewer.