Changeset 22894 in osm for applications
- Timestamp:
- 2010-08-30T14:47:46+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
r22891 r22894 62 62 String cat = ""; 63 63 String col = ""; 64 65 if (keys.containsKey("seamark:buoy_lateral:category")) 66 cat = keys.get("seamark:buoy_lateral:category"); 67 else if (keys.containsKey("seamark:beacon_lateral:category")) 68 cat = keys.get("seamark:beacon_lateral:category"); 64 String top = ""; 65 66 if (getStyleIndex() != LAT_PERCH) { 67 if (keys.containsKey("seamark:topmark:shape")) { 68 top = keys.get("seamark:topmark:shape"); 69 setTopMark(true); 70 } 71 if (keys.containsKey("seamark:topmark:colour")) { 72 setTopMark(true); 73 } 74 } 69 75 70 76 if (keys.containsKey("seamark:buoy_lateral:colour")) … … 75 81 col = keys.get("seamark:light_float:colour"); 76 82 83 if (keys.containsKey("seamark:buoy_lateral:category")) 84 cat = keys.get("seamark:buoy_lateral:category"); 85 else if (keys.containsKey("seamark:beacon_lateral:category")) 86 cat = keys.get("seamark:beacon_lateral:category"); 87 77 88 if (cat.equals("")) { 78 89 if (col.equals("red")) { 79 90 setColour(RED); 80 if ( getRegion() == IALA_A)91 if (top.equals("cylinder")) { 81 92 setBuoyIndex(PORT_HAND); 82 else 93 setRegion(IALA_A); 94 } else if (top.equals("cone, point up")) { 83 95 setBuoyIndex(STARBOARD_HAND); 96 setRegion(IALA_B); 97 } else { 98 if (getRegion() == IALA_A) 99 setBuoyIndex(PORT_HAND); 100 else 101 setBuoyIndex(STARBOARD_HAND); 102 } 84 103 } else if (col.equals("green")) { 85 104 setColour(GREEN); 86 if ( getRegion() == IALA_A)105 if (top.equals("cone, point up")) { 87 106 setBuoyIndex(STARBOARD_HAND); 88 else 107 setRegion(IALA_A); 108 } else if (top.equals("cylinder")) { 89 109 setBuoyIndex(PORT_HAND); 110 setRegion(IALA_B); 111 } else { 112 if (getRegion() == IALA_A) 113 setBuoyIndex(STARBOARD_HAND); 114 else 115 setBuoyIndex(PORT_HAND); 116 } 90 117 } else if (col.equals("red;green;red")) { 91 118 setColour(RED_GREEN_RED); 92 if ( getRegion() == IALA_A)119 if (top.equals("cylinder")) { 93 120 setBuoyIndex(PREF_PORT_HAND); 94 else 121 setRegion(IALA_A); 122 } else if (top.equals("cone, point up")) { 95 123 setBuoyIndex(PREF_STARBOARD_HAND); 124 setRegion(IALA_B); 125 } else { 126 if (getRegion() == IALA_A) 127 setBuoyIndex(PREF_PORT_HAND); 128 else 129 setBuoyIndex(PREF_STARBOARD_HAND); 130 } 96 131 } else if (col.equals("green;red;green")) { 97 132 setColour(GREEN_RED_GREEN); 98 if ( getRegion() == IALA_A)133 if (top.equals("cone, point up")) { 99 134 setBuoyIndex(PREF_STARBOARD_HAND); 100 else 135 setRegion(IALA_A); 136 } else if (top.equals("cylinder")) { 101 137 setBuoyIndex(PREF_PORT_HAND); 138 setRegion(IALA_B); 139 } else { 140 if (getRegion() == IALA_A) 141 setBuoyIndex(PREF_STARBOARD_HAND); 142 else 143 setBuoyIndex(PREF_PORT_HAND); 144 } 102 145 } 103 146 } else if (cat.equals("port")) { … … 226 269 refreshStyles(); 227 270 228 if (getStyleIndex() != LAT_PERCH) { 229 if (keys.containsKey("seamark:topmark:shape") 230 || keys.containsKey("seamark:topmark:colour")) { 231 setTopMark(true); 232 } 233 234 if (keys.containsKey("seamark:light:colour")) { 235 setLightColour(keys.get("seamark:light:colour")); 236 setFired(true); 237 } 238 239 if (keys.containsKey("seamark:light:character")) { 240 setLightGroup(keys); 241 setLightChar(keys.get("seamark:light:character")); 242 setLightPeriod(keys); 243 } 271 if (keys.containsKey("seamark:light:colour")) { 272 setLightColour(keys.get("seamark:light:colour")); 273 setFired(true); 274 } 275 276 if (keys.containsKey("seamark:light:character")) { 277 setLightGroup(keys); 278 setLightChar(keys.get("seamark:light:character")); 279 setLightPeriod(keys); 244 280 } 245 281 } … … 544 580 if (isFired()) 545 581 if (getLightColour().equals("R")) 546 dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource("/images/Light_Red_240.png"))); 582 dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource( 583 "/images/Light_Red_240.png"))); 547 584 else 548 dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource("/images/Light_Green_240.png"))); 585 dlg.lM01Icon02.setIcon(new ImageIcon(getClass().getResource( 586 "/images/Light_Green_240.png"))); 549 587 if (getLightChar() != "") { 550 588 String c;
Note:
See TracChangeset
for help on using the changeset viewer.