Changeset 22683 in osm for applications
- Timestamp:
- 2010-08-18T19:05:24+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/toms/src/toms
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java
r22657 r22683 349 349 } 350 350 351 if (name. compareTo("") == 0) {351 if (name.equals("")) { 352 352 if (keys.containsKey("seamark:buoy_lateral:name")) 353 353 name = keys.get("seamark:buoy_lateral:name"); … … 364 364 } 365 365 366 if (cat. compareTo("port") == 0) {366 if (cat.equals("port")) { 367 367 368 368 buoy = new BuoyLat(this, SeaMark.PORT_HAND); … … 1337 1337 i1 = it.indexOf("+"); 1338 1338 i2 = it.length(); 1339 if (c == "")1339 if (c.equals("")) 1340 1340 c = it; 1341 1341 else … … 1343 1343 } 1344 1344 1345 if (c == "")1345 if (c.equals("")) 1346 1346 c = it; 1347 1347 buoy.setLightChar(c); -
applications/editors/josm/plugins/toms/src/toms/seamarks/SeaMark.java
r22647 r22683 90 90 public final static int SPEC_SPHERE = 3; 91 91 public final static int SPEC_BARREL = 4; 92 public final static int SPEC_BEACON = 5; 92 public final static int SPEC_FLOAT = 5; 93 public final static int SPEC_BEACON = 6; 93 94 public final static int LIGHT_HOUSE = 1; 94 95 public final static int LIGHT_MAJOR = 2; -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
r22657 r22683 142 142 143 143 public void setLightPeriod(String lightPeriod) { 144 String regex = "^[\\d\\s ]+$";144 String regex = "^[\\d\\s.]+$"; 145 145 146 146 if (lightPeriod.length() == 0) … … 299 299 300 300 if (dlg.cM01Fired.isSelected()) { 301 if (colour == "red") {301 if (colour.equals("red")) { 302 302 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 303 303 "seamark:light:colour", "red")); 304 304 setLightColour("R"); 305 } else if (colour == "green") {305 } else if (colour.equals("green")) { 306 306 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 307 307 "seamark:light:colour", "green")); 308 308 setLightColour("G"); 309 } else if (colour == "white") {309 } else if (colour.equals("white")) { 310 310 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 311 311 "seamark:light:colour", "white")); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
r22626 r22683 167 167 168 168 dlg.cbM01Kennung.setSelectedItem(c); 169 if (dlg.cbM01Kennung.getSelectedItem() == "Not set")169 if (dlg.cbM01Kennung.getSelectedItem().equals("Not set")) 170 170 c = ""; 171 171 } -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
r22626 r22683 84 84 85 85 dlg.cbM01Kennung.setSelectedItem(c); 86 if (dlg.cbM01Kennung.getSelectedItem() == "Not set")86 if (dlg.cbM01Kennung.getSelectedItem().equals("Not set")) 87 87 c = ""; 88 88 } -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
r22657 r22683 343 343 344 344 dlg.cbM01Kennung.setSelectedItem(c); 345 if (dlg.cbM01Kennung.getSelectedItem() == "Not set")345 if (dlg.cbM01Kennung.getSelectedItem().equals("Not set")) 346 346 c = ""; 347 347 } … … 814 814 case PREF_PORT_HAND: 815 815 if (getRegion() == IALA_A) { 816 if (str. compareTo("red") == 0) {816 if (str.equals("red")) { 817 817 setFired(true); 818 818 super.setLightColour("R"); … … 821 821 } 822 822 } else { 823 if (str. compareTo("green") == 0) {823 if (str.equals("green")) { 824 824 setFired(true); 825 825 super.setLightColour("G"); … … 833 833 case PREF_STARBOARD_HAND: 834 834 if (getRegion() == IALA_A) { 835 if (str. compareTo("green") == 0) {835 if (str.equals("green")) { 836 836 setFired(true); 837 837 super.setLightColour("G"); … … 840 840 } 841 841 } else { 842 if (str. compareTo("red") == 0) {842 if (str.equals("red")) { 843 843 setFired(true); 844 844 super.setLightColour("R"); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
r22647 r22683 89 89 90 90 dlg.cbM01Kennung.setSelectedItem(c); 91 if (dlg.cbM01Kennung.getSelectedItem() == "Not set")91 if (dlg.cbM01Kennung.getSelectedItem().equals("Not set")) 92 92 c = ""; 93 93 } -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
r22647 r22683 25 25 dlg.cbM01StyleOfMark.addItem("Sphere Buoy"); 26 26 dlg.cbM01StyleOfMark.addItem("Barrel"); 27 dlg.cbM01StyleOfMark.addItem("Float"); 27 28 dlg.cbM01StyleOfMark.addItem("Beacon"); 28 29 29 30 dlg.cbM01Kennung.removeAllItems(); 30 31 dlg.cbM01Kennung.addItem("Not set"); 32 dlg.cbM01Kennung.addItem("Fl"); 33 dlg.cbM01Kennung.addItem("Fl(2)"); 34 dlg.cbM01Kennung.addItem("Fl(3)"); 35 dlg.cbM01Kennung.addItem("Fl(4)"); 36 dlg.cbM01Kennung.addItem("Fl(5)"); 37 dlg.cbM01Kennung.addItem("Oc(2)"); 38 dlg.cbM01Kennung.addItem("Oc(3)"); 39 dlg.cbM01Kennung.addItem("Q"); 40 dlg.cbM01Kennung.addItem("IQ"); 41 dlg.cbM01Kennung.setSelectedIndex(0); 31 42 32 43 dlg.cM01Fired.setSelected(false); … … 66 77 image += "_Barrel"; 67 78 break; 79 case SPEC_FLOAT: 80 image += "_Float"; 81 break; 68 82 case SPEC_BEACON: 69 83 image += "_Beacon"; … … 85 99 86 100 dlg.cbM01Kennung.setSelectedItem(c); 87 if (dlg.cbM01Kennung.getSelectedItem() == "Not set")101 if (dlg.cbM01Kennung.getSelectedItem().equals("Not set")) 88 102 c = ""; 89 103 } … … 132 146 "seamark:buoy_special_purpose:colour", "yellow")); 133 147 break; 148 case SPEC_FLOAT: 149 super.saveSign("light_Float"); 150 Main.main.undoRedo.add(new ChangePropertyCommand(node, 151 "seamark:light_float:colour", "yellow")); 152 break; 134 153 case SPEC_BEACON: 135 154 super.saveSign("beacon_special_purpose"); … … 161 180 str = keys.get("seamark:topmark:shape"); 162 181 163 if (str. compareTo("x-shape") == 0) {182 if (str.equals("x-shape")) { 164 183 setTopMark(true); 165 184 … … 193 212 } 194 213 195 if (str. compareTo("white") == 0) {214 if (str.equals("white")) { 196 215 setFired(true); 197 216 setLightColour("W"); … … 225 244 str = keys.get("seamark:buoy_special_purpose:shape"); 226 245 227 if (str. compareTo("pillar") == 0)246 if (str.equals("pillar")) 228 247 setStyleIndex(SPEC_PILLAR); 229 else if (str. compareTo("spar") == 0)248 else if (str.equals("spar")) 230 249 setStyleIndex(SPEC_SPAR); 231 else if (str. compareTo("sphere") == 0)250 else if (str.equals("sphere")) 232 251 setStyleIndex(SPEC_SPHERE); 233 else if (str. compareTo("barrel") == 0)252 else if (str.equals("barrel")) 234 253 setStyleIndex(SPEC_BARREL); 235 254 else … … 239 258 if (keys.containsKey("seamark:beacon_special_purpose")) 240 259 setStyleIndex(SPEC_BEACON); 241 return ret; 260 else if (keys.containsKey("seamark:light_float") 261 && keys.containsKey("seamark:light_float:colour") 262 && keys.get("seamark:light_float:colour").equals("yellow")) 263 setStyleIndex(SPEC_FLOAT); 264 265 return ret; 242 266 } 243 267
Note:
See TracChangeset
for help on using the changeset viewer.