Changeset 24801 in osm for applications/editors/josm
- Timestamp:
- 2010-12-18T23:27:23+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/dialogs/OSeaMAction.java
r24799 r24801 116 116 return; 117 117 } 118 119 mark = null; 118 120 119 121 Iterator<Node> it = selection.iterator(); … … 127 129 if (keys.containsKey("seamark:type")) 128 130 type = keys.get("seamark:type"); 129 130 131 if (type.equals("buoy_lateral") || type.equals("beacon_lateral")) { 131 132 mark = new MarkLat(this, node); 132 return;133 134 133 } else if (type.equals("buoy_cardinal") 135 134 || type.equals("beacon_cardinal")) { 136 135 mark = new MarkCard(this, node); 137 return;138 139 136 } else if (type.equals("buoy_safe_water") 140 137 || type.equals("beacon_safe_water")) { 141 138 mark = new MarkSaw(this, node); 142 return;143 144 139 } else if (type.equals("buoy_special_purpose") 145 140 || type.equals("beacon_special_purpose")) { 146 141 mark = new MarkSpec(this, node); 147 return;148 149 142 } else if (type.equals("buoy_isolated_danger") 150 143 || type.equals("beacon_isolated_danger")) { 151 144 mark = new MarkIsol(this, node); 152 return;153 154 145 } else if (type.equals("landmark") || type.equals("light_vessel") 155 146 || type.equals("light_major") || type.equals("light_minor")) { 156 147 mark = new MarkLight(this, node); 157 return;158 159 148 } else if (type.equals("light_float")) { 160 149 if (keys.containsKey("seamark:light_float:colour")) { … … 164 153 || str.equals("green;red;green")) { 165 154 mark = new MarkLat(this, node); 166 return;167 155 } else if (str.equals("black;yellow") 168 156 || str.equals("black;yellow;black") … … 170 158 || str.equals("yellow;black;yellow")) { 171 159 mark = new MarkCard(this, node); 172 return;173 160 } else if (str.equals("black;red;black")) { 174 161 mark = new MarkIsol(this, node); 175 return;176 162 } else if (str.equals("red;white")) { 177 163 mark = new MarkSaw(this, node); 178 return;179 164 } else if (str.equals("yellow")) { 180 165 mark = new MarkSpec(this, node); 181 return;182 166 } 183 167 } else if (keys.containsKey("seamark:light_float:topmark:shape")) { … … 185 169 if (str.equals("cylinder") || str.equals("cone, point up")) { 186 170 mark = new MarkLat(this, node); 187 return;188 171 } 189 172 } else if (keys.containsKey("seamark:light_float:topmark:colour")) { … … 191 174 if (str.equals("red") || str.equals("green")) { 192 175 mark = new MarkLat(this, node); 193 return;194 176 } 195 177 } 196 } 197 198 if (keys.containsKey("buoy_lateral:category") 178 } else if (keys.containsKey("buoy_lateral:category") 199 179 || keys.containsKey("beacon_lateral:category")) { 200 180 mark = new MarkLat(this, node); 201 return;202 181 } else if (keys.containsKey("buoy_cardinal:category") 203 182 || keys.containsKey("beacon_cardinal:category")) { 204 183 mark = new MarkCard(this, node); 205 return;206 184 } else if (keys.containsKey("buoy_isolated_danger:category") 207 185 || keys.containsKey("beacon_isolated_danger:category")) { 208 186 mark = new MarkIsol(this, node); 209 return;210 187 } else if (keys.containsKey("buoy_safe_water:category") 211 188 || keys.containsKey("beacon_safe_water:category")) { 212 189 mark = new MarkSaw(this, node); 213 return;214 190 } else if (keys.containsKey("buoy_special_purpose:category") 215 191 || keys.containsKey("beacon_special_purpose:category")) { 216 192 mark = new MarkSpec(this, node); 217 return; 218 } 219 220 if (keys.containsKey("buoy_lateral:shape") 193 } else if (keys.containsKey("buoy_lateral:shape") 221 194 || keys.containsKey("beacon_lateral:shape")) { 222 195 mark = new MarkLat(this, node); 223 return;224 196 } else if (keys.containsKey("buoy_cardinal:shape") 225 197 || keys.containsKey("beacon_cardinal:shape")) { 226 198 mark = new MarkCard(this, node); 227 return;228 199 } else if (keys.containsKey("buoy_isolated_danger:shape") 229 200 || keys.containsKey("beacon_isolated_danger:shape")) { 230 201 mark = new MarkIsol(this, node); 231 return;232 202 } else if (keys.containsKey("buoy_safe_water:shape") 233 203 || keys.containsKey("beacon_safe_water:shape")) { 234 204 mark = new MarkSaw(this, node); 235 return;236 205 } else if (keys.containsKey("buoy_special_purpose:shape") 237 206 || keys.containsKey("beacon_special_purpose:shape")) { 238 207 mark = new MarkSpec(this, node); 239 return; 240 } 241 242 if (keys.containsKey("buoy_lateral:colour") 208 } else if (keys.containsKey("buoy_lateral:colour") 243 209 || keys.containsKey("beacon_lateral:colour")) { 244 210 mark = new MarkLat(this, node); 245 return;246 211 } else if (keys.containsKey("buoy_cardinal:colour") 247 212 || keys.containsKey("beacon_cardinal:colour")) { 248 213 mark = new MarkCard(this, node); 249 return;250 214 } else if (keys.containsKey("buoy_isolated_danger:colour") 251 215 || keys.containsKey("beacon_isolated_danger:colour")) { 252 216 mark = new MarkIsol(this, node); 253 return;254 217 } else if (keys.containsKey("buoy_safe_water:colour") 255 218 || keys.containsKey("beacon_safe_water:colour")) { 256 219 mark = new MarkSaw(this, node); 257 return;258 220 } else if (keys.containsKey("buoy_special_purpose:colour") 259 221 || keys.containsKey("beacon_special_purpose:colour")) { 260 222 mark = new MarkSpec(this, node); 261 return; 262 } 263 264 manager.showVisualMessage(tr("No seamark recognised at this node")); 265 mark = new MarkUkn(this, node); 266 return; 223 } 224 225 if (mark == null) { 226 manager.showVisualMessage(tr("No seamark recognised at this node")); 227 mark = new MarkUkn(this, node); 228 } else { 229 mark.parseMark(); 230 } 267 231 } 268 269 232 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkCard.java
r24799 r24801 12 12 13 13 public MarkCard(OSeaMAction dia, Node node) { 14 super(dia); 15 14 super(dia, node); 15 } 16 17 public void parseMark() { 16 18 String str; 17 19 Map<String, String> keys; 18 keys = node.getKeys(); 19 setNode(node); 20 keys = getNode().getKeys(); 20 21 21 22 if (!dlg.panelMain.hazButton.isSelected()) -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkIsol.java
r24786 r24801 10 10 public class MarkIsol extends SeaMark { 11 11 public MarkIsol(OSeaMAction dia, Node node) { 12 super(dia); 12 super(dia, node); 13 } 14 15 public void parseMark() { 13 16 14 17 String str; 15 18 Map<String, String> keys; 16 keys = node.getKeys(); 17 setNode(node); 19 keys = getNode().getKeys(); 18 20 /* 19 21 dlg.cbM01TypeOfMark.setSelectedIndex(ISOLATED_DANGER); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkLat.java
r24786 r24801 9 9 public class MarkLat extends SeaMark { 10 10 public MarkLat(OSeaMAction dia, Node node) { 11 super(dia); 11 super(dia, node); 12 } 13 14 public void parseMark() { 12 15 13 16 String str; 14 17 Map<String, String> keys; 15 keys = node.getKeys(); 16 setNode(node); 18 keys = getNode().getKeys(); 17 19 /* 18 20 dlg.cbM01TypeOfMark.setSelectedIndex(LATERAL); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkLight.java
r24786 r24801 10 10 public class MarkLight extends SeaMark { 11 11 public MarkLight(OSeaMAction dia, Node node) { 12 super(dia); 12 super(dia, node); 13 } 14 15 public void parseMark() { 13 16 14 17 Map<String, String> keys; 15 keys = node.getKeys(); 16 setNode(node); 18 keys = getNode().getKeys(); 17 19 18 20 /* dlg.cbM01TypeOfMark.setSelectedIndex(LIGHT); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkSaw.java
r24786 r24801 10 10 public class MarkSaw extends SeaMark { 11 11 public MarkSaw(OSeaMAction dia, Node node) { 12 super(dia); 12 super(dia, node); 13 } 14 15 public void parseMark() { 13 16 14 17 String str; 15 18 Map<String, String> keys; 16 keys = node.getKeys(); 17 setNode(node); 19 keys = getNode().getKeys(); 18 20 19 21 /* dlg.cbM01TypeOfMark.setSelectedIndex(SAFE_WATER); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkSpec.java
r24786 r24801 10 10 public class MarkSpec extends SeaMark { 11 11 public MarkSpec(OSeaMAction dia, Node node) { 12 super(dia); 12 super(dia, node); 13 } 14 15 public void parseMark() { 13 16 14 17 String str; 15 18 Map<String, String> keys; 16 keys = node.getKeys(); 17 setNode(node); 19 keys = getNode().getKeys(); 18 20 19 21 /* dlg.cbM01TypeOfMark.setSelectedIndex(SPECIAL_PURPOSE); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/MarkUkn.java
r24799 r24801 1 1 package oseam.seamarks; 2 3 import java.util.Map;4 5 import javax.swing.ButtonGroup;6 2 7 3 import org.openstreetmap.josm.data.osm.Node; … … 11 7 public class MarkUkn extends SeaMark { 12 8 public MarkUkn(OSeaMAction dia, Node node) { 13 super(dia); 14 15 String str; 16 Map<String, String> keys; 17 keys = node.getKeys(); 18 setNode(node); 19 9 super(dia, node); 20 10 dlg.panelMain.clearSelections(); 21 11 } 22 12 13 public void parseMark() {} 14 23 15 public void paintSign() { 24 16 /* if (dlg.paintlock) -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r24799 r24801 69 69 70 70 public void setDlg(OSeaMAction dia) { 71 this.dlg = dia;72 }73 74 protected SeaMark(OSeaMAction dia) {75 71 dlg = dia; 72 } 73 74 protected SeaMark(OSeaMAction dia, Node node) { 75 dlg = dia; 76 this.node = node; 76 77 } 77 78 … … 178 179 } 179 180 181 public abstract void parseMark(); 182 180 183 public abstract void paintSign(); 181 184
Note:
See TracChangeset
for help on using the changeset viewer.