Changeset 22746 in osm for applications
- Timestamp:
- 2010-08-23T12:41:36+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/toms/src/toms
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/toms/src/toms/dialogs/SmpDialogAction.java
r22732 r22746 89 89 SelNode = node; 90 90 parseSeaMark(); 91 buoy.paintSign(); 91 92 } 92 93 } … … 271 272 buoy = new BuoyUkn(this, "active layer contains no OSM data"); 272 273 buoy.setNode(null); 273 buoy.paintSign();274 274 return; 275 275 } … … 281 281 buoy = new BuoyUkn(this, "Please select a node"); 282 282 buoy.setNode(null); 283 buoy.paintSign();284 283 return; 285 284 } … … 288 287 buoy = new BuoyUkn(this, "Please select only one node"); 289 288 buoy.setNode(null); 290 buoy.paintSign();291 289 return; 292 290 } … … 335 333 || keys.containsKey("seamark:beacon_lateral:colour")) { 336 334 buoy = new BuoyLat(this, node); 337 buoy.paintSign();338 335 return; 339 336 … … 346 343 || keys.containsKey("seamark:beacon_cardinal:colour")) { 347 344 buoy = new BuoyCard(this, node); 348 buoy.paintSign();349 345 return; 350 346 … … 356 352 || keys.containsKey("seamark:beacon_safe_water:colour")) { 357 353 buoy = new BuoySaw(this, node); 358 buoy.paintSign();359 354 return; 360 355 … … 366 361 || keys.containsKey("seamark:beacon_special_purpose:colour")) { 367 362 buoy = new BuoySpec(this, node); 368 buoy.paintSign();369 363 return; 370 364 … … 376 370 || keys.containsKey("seamark:beacon_isolated_danger:colour")) { 377 371 buoy = new BuoyIsol(this, node); 378 buoy.paintSign();379 372 return; 380 373 … … 385 378 || str.equals("red;green;red") || str.equals("green;red;green")) { 386 379 buoy = new BuoyLat(this, node); 387 buoy.paintSign();388 380 return; 389 381 } else if (str.equals("black;yellow") … … 391 383 || str.equals("yellow;black;yellow")) { 392 384 buoy = new BuoyCard(this, node); 393 buoy.paintSign();394 385 return; 395 386 } else if (str.equals("black;red;black")) { 396 387 buoy = new BuoyIsol(this, node); 397 buoy.paintSign();398 388 return; 399 389 } else if (str.equals("red;white")) { 400 390 buoy = new BuoySaw(this, node); 401 buoy.paintSign();402 391 return; 403 392 } else if (str.equals("yellow")) { 404 393 buoy = new BuoySaw(this, node); 405 buoy.paintSign();406 394 return; 407 395 } else { 408 396 buoy = new BuoyUkn(this, "Parse-Error: Invalid colour"); 409 397 buoy.setNode(node); 410 buoy.paintSign();411 398 return; 412 399 } … … 415 402 if (str.equals("cylinder") || str.equals("cone, point up")) { 416 403 buoy = new BuoyLat(this, node); 417 buoy.paintSign();418 404 return; 419 405 } … … 422 408 if (str.equals("red") || str.equals("green")) { 423 409 buoy = new BuoyLat(this, node); 424 buoy.paintSign();425 410 return; 426 411 } … … 431 416 buoy = new BuoyUkn(this, "Seamark not set"); 432 417 buoy.setNode(node); 433 buoy.paintSign();434 418 return; 435 419 } … … 464 448 465 449 parseSeaMark(); 450 buoy.paintSign(); 466 451 } 467 452 … … 589 574 if (buoy == null) { 590 575 buoy = new BuoyUkn(dia, "Seamark not set"); 591 buoy.paintSign();592 576 return; 593 577 } -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
r22732 r22746 220 220 221 221 public void paintSign() { 222 222 223 dlg.cbM01TypeOfMark.setEnabled(true); 223 224 dlg.cbM01StyleOfMark.setEnabled(true); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
r22732 r22746 81 81 } 82 82 83 if (keys.containsKey("seamark:topmark:shape")) { 84 str = keys.get("seamark:topmark:shape"); 85 if (str.equals("2 spheres")) { 83 if (keys.containsKey("seamark:topmark:shape") 84 || keys.containsKey("seamark:topmark:colour")) { 86 85 setTopMark(true); 87 }88 86 } 89 87 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
r22732 r22746 168 168 } 169 169 170 refreshStyles();171 172 170 if (keys.containsKey("seamark:buoy_lateral:shape")) { 173 171 str = keys.get("seamark:buoy_lateral:shape"); … … 224 222 } 225 223 226 if (keys.containsKey("seamark:topmark:shape")) { 227 str = keys.get("seamark:topmark:shape"); 228 229 switch (getBuoyIndex()) { 230 case PORT_HAND: 231 case PREF_PORT_HAND: 232 if (str.equals("cylinder")) { 233 setTopMark(true); 234 setRegion(IALA_A); 235 } else if (str.equals("cone, point up")) { 236 setTopMark(true); 237 setRegion(IALA_B); 238 } else { 239 setTopMark(false); 240 } 241 break; 242 243 case STARBOARD_HAND: 244 case PREF_STARBOARD_HAND: 245 if (str.equals("cone, point up")) { 246 setTopMark(true); 247 setRegion(IALA_A); 248 } else if (str.equals("cylinder")) { 249 setTopMark(true); 250 setRegion(IALA_B); 251 } else { 252 setTopMark(false); 253 } 254 break; 255 } 224 refreshStyles(); 225 226 if (keys.containsKey("seamark:topmark:shape") 227 || keys.containsKey("seamark:topmark:colour")) { 228 setTopMark(true); 256 229 } 257 230 … … 321 294 setStyleIndex(style); 322 295 dlg.cbM01StyleOfMark.setSelectedIndex(style); 323 324 296 } 325 297 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
r22732 r22746 95 95 } 96 96 97 if (keys.containsKey("seamark:topmark:shape")) { 98 str = keys.get("seamark:topmark:shape"); 99 100 if (str.equals("spherical") || str.equals("sphere")) { 97 if (keys.containsKey("seamark:topmark:shape") 98 || keys.containsKey("seamark:topmark:colour")) { 101 99 setTopMark(true); 102 }103 100 } 104 101 }
Note:
See TracChangeset
for help on using the changeset viewer.