Changeset 23155 in osm for applications/editors/josm
- Timestamp:
- 2010-09-14T14:50:20+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
r23138 r23155 426 426 return; 427 427 428 } else if (type.equals("landmark") || type.equals("light_vessel") //$NON-NLS-1$ 429 || type.equals("light_major") || type.equals("light_minor")) { //$NON-NLS-1$ 430 buoy = new BuoyNota(this, node); 431 return; 432 428 433 } else if (type.equals("light_float")) { //$NON-NLS-1$ 429 434 if (keys.containsKey("seamark:light_float:colour")) { //$NON-NLS-1$ … … 783 788 buoy = new BuoyLat(dia, n); 784 789 buoy.setBuoyIndex(0); 785 cbM01CatOfMark.removeAllItems();786 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.152")); //$NON-NLS-1$787 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.153")); //$NON-NLS-1$788 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.154")); //$NON-NLS-1$789 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.155")); //$NON-NLS-1$790 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.156")); //$NON-NLS-1$791 790 } 792 791 break; … … 796 795 buoy = new BuoyCard(dia, n); 797 796 buoy.setBuoyIndex(0); 798 cbM01CatOfMark.removeAllItems();799 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.157")); //$NON-NLS-1$800 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.158")); //$NON-NLS-1$801 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.159")); //$NON-NLS-1$802 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.160")); //$NON-NLS-1$803 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.161")); //$NON-NLS-1$804 797 } 805 798 break; … … 822 815 if (!(buoy instanceof BuoySpec)) { 823 816 buoy = new BuoySpec(dia, n); 824 cbM01TopMark.removeAllItems();825 cbM01TopMark.addItem(Messages.getString("SmpDialogAction.212"));826 cbM01TopMark.addItem(Messages.getString("SmpDialogAction.210")); //$NON-NLS-1$827 cbM01TopMark.addItem(Messages.getString("SmpDialogAction.211")); //$NON-NLS-1$828 817 } 829 818 buoy.setBuoyIndex(type); … … 834 823 buoy = new BuoyNota(dia, n); 835 824 buoy.setBuoyIndex(0); 836 cbM01CatOfMark.removeAllItems();837 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.157")); //$NON-NLS-1$838 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.206")); //$NON-NLS-1$839 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.207")); //$NON-NLS-1$840 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.208")); //$NON-NLS-1$841 cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.209")); //$NON-NLS-1$842 825 } 843 826 break; -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
r23141 r23155 328 328 } 329 329 330 public void parseLights(Map<String, String> k) {331 Iterator it = k.entrySet().iterator();332 while (it.hasNext()) {333 String key = (String) ((Map.Entry) it.next()).getKey();334 if (key.contains("seamark:light:")) {335 String value = ((String) ((Map.Entry) it.next()).getValue()).trim();336 337 }338 }339 }340 341 330 private Node Node = null; 342 331 … … 379 368 public boolean isValid() { 380 369 return false; 370 } 371 372 public void parseLights(Map<String, String> k) { 373 setFired(false); 374 setSectored(false); 375 Iterator it = k.entrySet().iterator(); 376 while (it.hasNext()) { 377 Map.Entry entry = (Map.Entry)it.next(); 378 String key = (String) entry.getKey(); 379 String value = ((String) entry.getValue()).trim(); 380 if (key.contains("seamark:light:")) { 381 setFired(true); 382 int index = 0; 383 key = key.substring(14); 384 if (key.matches("^\\d:.*")) { 385 index = key.charAt(0) - '0'; 386 key = key.substring(2); 387 } else if (key.matches("^\\d$")) { 388 index = key.charAt(0) - '0'; 389 key = ""; 390 } else { 391 index = 0; 392 } 393 if (index != 0) setSectored(true); 394 if (key.equals("colour")) { 395 if (value.equals("red")) 396 LightColour[index] = "R"; 397 else if (value.equals("green")) 398 LightColour[index] = "G"; 399 else if (value.equals("white")) 400 LightColour[index] = "W"; 401 } else if (key.equals("character")) { 402 LightChar[index] = value; 403 } else if (key.equals("group")) { 404 LightGroup[index] = value; 405 } else if (key.equals("period")) { 406 LightPeriod[index] = value; 407 } else if (key.equals("height")) { 408 Height[index] = value; 409 } else if (key.equals("range")) { 410 Range[index] = value; 411 } 412 } 413 } 381 414 } 382 415 … … 659 692 if (colour.equals("R")) { 660 693 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 661 "seamark:light:colour:" + i, "red")); 662 if ((Bearing1[i] != null) && (Bearing2[i] != null) && (Radius[i] != null)) 663 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 664 "seamark:light:" + i, "red:" + Bearing1[i] + ":" + Bearing2[i] + ":" + Radius[i])); 694 "seamark:light:" + i + ":colour", "red")); 695 if ((Bearing1[i] != null) && (Bearing2[i] != null) 696 && (Radius[i] != null)) 697 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 698 "seamark:light:" + i, "red:" + Bearing1[i] + ":" 699 + Bearing2[i] + ":" + Radius[i])); 665 700 } else if (colour.equals("G")) { 666 701 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 667 "seamark:light:colour:" + i, "green")); 668 if ((Bearing1[i] != null) && (Bearing2[i] != null) && (Radius[i] != null)) 702 "seamark:light:" + i + ":colour", "green")); 703 if ((Bearing1[i] != null) && (Bearing2[i] != null) 704 && (Radius[i] != null)) 669 705 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 670 "seamark:light:" + i, "green:" + Bearing1[i] + ":" + Bearing2[i] + ":" + Radius[i])); 706 "seamark:light:" + i, "green:" + Bearing1[i] + ":" 707 + Bearing2[i] + ":" + Radius[i])); 671 708 } else if (colour.equals("W")) { 672 709 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 673 "seamark:light:colour:" + i, "white")); 674 if ((Bearing1[i] != null) && (Bearing2[i] != null) && (Radius[i] != null)) 710 "seamark:light:" + i + ":colour", "white")); 711 if ((Bearing1[i] != null) && (Bearing2[i] != null) 712 && (Radius[i] != null)) 675 713 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 676 "seamark:light:" + i, "white:" + Bearing1[i] + ":" + Bearing2[i] + ":" + Radius[i])); 714 "seamark:light:" + i, "white:" + Bearing1[i] + ":" 715 + Bearing2[i] + ":" + Radius[i])); 677 716 } 678 717 679 718 if (LightPeriod[i] != null) 680 719 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 681 "seamark:light: period:" + i, LightPeriod[i]));720 "seamark:light:" + i + ":period", LightPeriod[i])); 682 721 683 722 if (LightChar[i] != null) 684 723 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 685 "seamark:light: character:" + i, LightChar[i]));724 "seamark:light:" + i + ":character", LightChar[i])); 686 725 687 726 if (LightGroup[i] != null) 688 727 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 689 "seamark:light: group:" + i, LightGroup[i]));728 "seamark:light:" + i + ":group", LightGroup[i])); 690 729 691 730 if (Height[i] != null) 692 731 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 693 "seamark:light: height:" + i, Height[i]));732 "seamark:light:" + i + ":height", Height[i])); 694 733 695 734 if (Range[i] != null) 696 735 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 697 "seamark:light:range:" + i, Range[i])); 736 "seamark:light:" + i + ":range", Range[i])); 737 738 if (Bearing1[i] != null) 739 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 740 "seamark:light:" + i + ":sector_start", Bearing1[i])); 741 742 if (Bearing2[i] != null) 743 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 744 "seamark:light:" + i + ":sector_end", Bearing2[i])); 698 745 } 699 746 } … … 817 864 dlg.cbM01CatOfMark.setVisible(false); 818 865 dlg.lM01CatOfMark.setVisible(false); 866 setBuoyIndex(0); 819 867 dlg.cbM01StyleOfMark.removeAllItems(); 820 868 dlg.cbM01StyleOfMark.setVisible(false); 821 869 dlg.lM01StyleOfMark.setVisible(false); 870 setStyleIndex(0); 822 871 dlg.tfM01Name.setText(""); 823 872 dlg.tfM01Name.setEnabled(false); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
r23141 r23155 27 27 28 28 resetMask(); 29 dlg.cbM01CatOfMark.removeAllItems(); 30 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.157")); //$NON-NLS-1$ 31 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.158")); //$NON-NLS-1$ 32 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.159")); //$NON-NLS-1$ 33 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.160")); //$NON-NLS-1$ 34 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.161")); //$NON-NLS-1$ 35 29 36 dlg.cbM01CatOfMark.setEnabled(true); 30 37 dlg.cbM01CatOfMark.setVisible(true); … … 40 47 dlg.cbM01StyleOfMark.setVisible(true); 41 48 dlg.lM01StyleOfMark.setVisible(true); 49 50 dlg.cbM01TypeOfMark.setSelectedIndex(CARDINAL); 42 51 43 52 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); //$NON-NLS-1$ //$NON-NLS-2$ … … 98 107 } 99 108 109 dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex()); 110 100 111 if (keys.containsKey("seamark:buoy_cardinal:shape")) { //$NON-NLS-1$ 101 112 str = keys.get("seamark:buoy_cardinal:shape"); //$NON-NLS-1$ … … 120 131 } 121 132 133 if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount()) 134 setStyleIndex(0); 135 dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex()); 136 137 parseLights(keys); 122 138 refreshLights(); 123 124 if (keys.containsKey("seamark:light:colour")) { //$NON-NLS-1$125 str = keys.get("seamark:light:colour"); //$NON-NLS-1$126 127 if (keys.containsKey("seamark:light:character")) { //$NON-NLS-1$128 int i1;129 String tmp = null;130 131 setLightGroup(keys);132 133 String c = keys.get("seamark:light:character"); //$NON-NLS-1$134 135 if (c.contains("+")) { //$NON-NLS-1$136 i1 = c.indexOf("+"); //$NON-NLS-1$137 tmp = c.substring(i1, c.length());138 c = c.substring(0, i1);139 }140 141 if (getLightGroup() != "") //$NON-NLS-1$142 if (tmp != null) {143 c = c + tmp;144 }145 146 setLightChar(c);147 setLightPeriod(keys);148 }149 150 if (str.equals("white")) { //$NON-NLS-1$151 setFired(true);152 setLightColour("W"); //$NON-NLS-1$153 }154 }155 139 } 156 140 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
r23141 r23155 26 26 27 27 resetMask(); 28 29 dlg.cbM01TypeOfMark.setSelectedIndex(ISOLATED_DANGER); 28 30 29 31 dlg.cbM01StyleOfMark.removeAllItems(); … … 37 39 dlg.lM01StyleOfMark.setVisible(true); 38 40 39 refreshLights();40 41 41 setBuoyIndex(ISOLATED_DANGER); 42 42 setColour(SeaMark.BLACK_RED_BLACK); … … 80 80 } 81 81 82 if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount()) 83 setStyleIndex(0); 84 dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex()); 85 82 86 if (keys.containsKey("seamark:topmark:shape") //$NON-NLS-1$ 83 87 || keys.containsKey("seamark:topmark:colour")) { //$NON-NLS-1$ … … 85 89 } 86 90 87 if (keys.containsKey("seamark:light:colour")) { //$NON-NLS-1$ 88 str = keys.get("seamark:light:colour"); //$NON-NLS-1$ 89 90 if (keys.containsKey("seamark:light:character")) { //$NON-NLS-1$ 91 setLightGroup(keys); 92 String c = keys.get("seamark:light:character"); //$NON-NLS-1$ 93 setLightChar(c); 94 setLightPeriod(keys); 95 } 96 97 if (str.equals("white")) { //$NON-NLS-1$ 98 setFired(true); 99 setLightColour("W"); //$NON-NLS-1$ 100 } 101 } 91 parseLights(keys); 92 refreshLights(); 102 93 } 103 94 -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
r23141 r23155 25 25 26 26 resetMask(); 27 28 dlg.cbM01CatOfMark.removeAllItems(); 29 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.152")); //$NON-NLS-1$ 30 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.153")); //$NON-NLS-1$ 31 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.154")); //$NON-NLS-1$ 32 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.155")); //$NON-NLS-1$ 33 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.156")); //$NON-NLS-1$ 27 34 28 35 dlg.rbM01RegionA.setEnabled(true); … … 41 48 dlg.cbM01StyleOfMark.setEnabled(true); 42 49 43 refreshLights();50 dlg.cbM01TypeOfMark.setSelectedIndex(LATERAL); 44 51 45 52 if (keys.containsKey("name")) //$NON-NLS-1$ … … 206 213 } 207 214 } 215 216 dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex()); 208 217 209 218 if (keys.containsKey("seamark:buoy_lateral:shape")) { //$NON-NLS-1$ … … 264 273 265 274 refreshStyles(); 266 267 if (keys.containsKey("seamark:light:colour")) { //$NON-NLS-1$ 268 setLightColour(keys.get("seamark:light:colour")); //$NON-NLS-1$ 269 setFired(true); 270 } 271 272 if (keys.containsKey("seamark:light:character")) { //$NON-NLS-1$ 273 setLightGroup(keys); 274 setLightChar(keys.get("seamark:light:character")); //$NON-NLS-1$ 275 setLightPeriod(keys); 276 setFired(true); 277 } 275 parseLights(keys); 276 refreshLights(); 278 277 setLightColour(); 279 278 } -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java
r23140 r23155 27 27 resetMask(); 28 28 29 dlg.cbM01TypeOfMark.setSelectedIndex(LIGHT); 30 29 31 dlg.cbM01CatOfMark.setEnabled(true); 30 32 dlg.cbM01CatOfMark.setVisible(true); 31 33 dlg.lM01CatOfMark.setVisible(true); 32 34 35 dlg.cbM01CatOfMark.removeAllItems(); 36 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.157")); //$NON-NLS-1$ 37 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.206")); //$NON-NLS-1$ 38 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.207")); //$NON-NLS-1$ 39 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.208")); //$NON-NLS-1$ 40 dlg.cbM01CatOfMark.addItem(Messages.getString("SmpDialogAction.209")); //$NON-NLS-1$ 41 42 setRegion(Main.pref.get("tomsplugin.IALA").equals("B")); //$NON-NLS-1$ //$NON-NLS-2$ 43 44 if (keys.containsKey("name")) //$NON-NLS-1$ 45 setName(keys.get("name")); //$NON-NLS-1$ 46 47 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 48 setName(keys.get("seamark:name")); //$NON-NLS-1$ 49 50 if (keys.containsKey("seamark:landmark:name")) //$NON-NLS-1$ 51 setName(keys.get("seamark:landmark:name")); //$NON-NLS-1$ 52 else if (keys.containsKey("seamark:light_major:name")) //$NON-NLS-1$ 53 setName(keys.get("seamark:light_major:name")); //$NON-NLS-1$ 54 else if (keys.containsKey("seamark:light_minor:name")) //$NON-NLS-1$ 55 setName(keys.get("seamark:light_minor:name")); //$NON-NLS-1$ 56 else if (keys.containsKey("seamark:light_vessel:name")) //$NON-NLS-1$ 57 setName(keys.get("seamark:light_vessel:name")); //$NON-NLS-1$ 58 59 if (keys.containsKey("seamark:type")) { //$NON-NLS-1$ 60 String type = keys.get("seamark:type"); //$NON-NLS-1$ 61 if (type.equals("landmark")) 62 setBuoyIndex(LIGHT_HOUSE); 63 else if (type.equals("light_major")) 64 setBuoyIndex(LIGHT_MAJOR); 65 else if (type.equals("light_minor")) 66 setBuoyIndex(LIGHT_MINOR); 67 else if (type.equals("light_vessel")) 68 setBuoyIndex(LIGHT_VESSEL); 69 } 70 71 dlg.cbM01CatOfMark.setSelectedIndex(getBuoyIndex()); 72 73 parseLights(keys); 33 74 refreshLights(); 34 setLightColour();35 36 75 setTopMark(false); 37 76 setFired(true); … … 98 137 switch (getBuoyIndex()) { 99 138 case LIGHT_HOUSE: 100 super.saveSign("l ighthouse"); //$NON-NLS-1$139 super.saveSign("landmark"); //$NON-NLS-1$ 101 140 break; 102 141 case LIGHT_MAJOR: 103 super.saveSign(" major_light"); //$NON-NLS-1$142 super.saveSign("light_major"); //$NON-NLS-1$ 104 143 break; 105 144 case LIGHT_MINOR: 106 super.saveSign("minor_light"); //$NON-NLS-1$ 145 super.saveSign("light_minor"); //$NON-NLS-1$ 146 break; 147 case LIGHT_VESSEL: 148 super.saveSign("light_vessel"); //$NON-NLS-1$ 107 149 break; 108 150 default: … … 115 157 } 116 158 117 public boolean parseTopMark(Node node) {118 return false;119 }120 121 public boolean parseLight(Node node) {122 String str;123 boolean ret = true;124 Map<String, String> keys;125 126 setFired(true);127 128 keys = node.getKeys();129 130 if (keys.containsKey("seamark:light:colour")) { //$NON-NLS-1$131 str = keys.get("seamark:light:colour"); //$NON-NLS-1$132 133 if (keys.containsKey("seamark:light:character")) { //$NON-NLS-1$134 setLightGroup(keys);135 136 String c = keys.get("seamark:light:character"); //$NON-NLS-1$137 if (getLightGroup() != "") //$NON-NLS-1$138 c = c + "(" + getLightGroup() + ")"; //$NON-NLS-1$ //$NON-NLS-2$139 setLightChar(c);140 setLightPeriod(keys);141 }142 143 setLightColour(str);144 145 }146 147 return ret;148 }149 150 159 } -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
r23141 r23155 26 26 27 27 resetMask(); 28 29 dlg.cbM01TypeOfMark.setSelectedIndex(SAFE_WATER); 28 30 29 31 dlg.cbM01StyleOfMark.removeAllItems(); … … 37 39 dlg.lM01StyleOfMark.setVisible(true); 38 40 39 refreshLights();40 41 41 setBuoyIndex(SAFE_WATER); 42 42 setColour(SeaMark.RED_WHITE); … … 74 74 } 75 75 76 if (keys.containsKey("seamark:light:colour")) { //$NON-NLS-1$ 77 str = keys.get("seamark:light:colour"); //$NON-NLS-1$ 78 79 if (keys.containsKey("seamark:light:character")) { //$NON-NLS-1$ 80 setLightGroup(keys); 81 String c = keys.get("seamark:light:character"); //$NON-NLS-1$ 82 if (getLightGroup() != "") //$NON-NLS-1$ 83 c = c + "(" + getLightGroup() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ 84 setLightChar(c); 85 setLightPeriod(keys); 86 } 87 88 if (str.equals("white")) { //$NON-NLS-1$ 89 setFired(true); 90 setLightColour("W"); //$NON-NLS-1$ 91 } 92 } 93 76 if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount()) 77 setStyleIndex(0); 78 dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex()); 79 94 80 if (keys.containsKey("seamark:topmark:shape") //$NON-NLS-1$ 95 81 || keys.containsKey("seamark:topmark:colour")) { //$NON-NLS-1$ 96 82 setTopMark(true); 97 83 } 84 85 parseLights(keys); 86 refreshLights(); 98 87 } 99 88 … … 104 93 dlg.cbM01Kennung.addItem("Oc"); //$NON-NLS-1$ 105 94 dlg.cbM01Kennung.addItem("LFl"); //$NON-NLS-1$ 106 dlg.cbM01Kennung.addItem("Mo ()"); //$NON-NLS-1$95 dlg.cbM01Kennung.addItem("Mo"); //$NON-NLS-1$ 107 96 dlg.cbM01Kennung.setSelectedIndex(0); 108 97 } -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
r23141 r23155 26 26 27 27 resetMask(); 28 29 dlg.cbM01TypeOfMark.setSelectedIndex(SPECIAL_PURPOSE); 28 30 29 31 dlg.cbM01StyleOfMark.removeAllItems(); … … 39 41 dlg.lM01StyleOfMark.setVisible(true); 40 42 41 refreshLights(); 43 dlg.cbM01TopMark.removeAllItems(); 44 dlg.cbM01TopMark.addItem(Messages.getString("SmpDialogAction.212")); 45 dlg.cbM01TopMark.addItem(Messages.getString("SmpDialogAction.210")); //$NON-NLS-1$ 46 dlg.cbM01TopMark.addItem(Messages.getString("SmpDialogAction.211")); //$NON-NLS-1$ 42 47 43 48 dlg.cM01TopMark.setEnabled(true); … … 87 92 setStyleIndex(SPEC_FLOAT); 88 93 94 if (getStyleIndex() >= dlg.cbM01StyleOfMark.getItemCount()) 95 setStyleIndex(0); 96 dlg.cbM01StyleOfMark.setSelectedIndex(getStyleIndex()); 97 89 98 keys = node.getKeys(); 90 99 if (keys.containsKey("seamark:topmark:shape")) { //$NON-NLS-1$ … … 96 105 } 97 106 98 if (keys.containsKey("seamark:light:colour")) { //$NON-NLS-1$ 99 str = keys.get("seamark:light:colour"); //$NON-NLS-1$ 100 101 if (keys.containsKey("seamark:light:character")) { //$NON-NLS-1$ 102 setLightGroup(keys); 103 104 String c = keys.get("seamark:light:character"); //$NON-NLS-1$ 105 if (getLightGroup() != "") //$NON-NLS-1$ 106 c = c + "(" + getLightGroup() + ")"; //$NON-NLS-1$ //$NON-NLS-2$ 107 108 setLightChar(c); 109 setLightPeriod(keys); 110 } 111 112 if (str.equals("white")) { //$NON-NLS-1$ 113 setFired(true); 114 setLightColour("W"); //$NON-NLS-1$ 115 } 116 } 107 parseLights(keys); 108 refreshLights(); 117 109 } 118 110
Note:
See TracChangeset
for help on using the changeset viewer.