Changeset 25542 in osm
- Timestamp:
- 2011-03-08T13:34:45+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/toms/src/toms/seamarks/buoys
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
r23375 r25542 28 28 * private Variablen 29 29 */ 30 31 private String Longname = ""; 32 33 public String getLongname() { 34 return Longname; 35 } 36 37 public void setLongname(String name) { 38 Longname = name; 39 } 40 41 private String Ref = ""; 42 43 public String getRef() { 44 return Ref; 45 } 46 47 public void setRef(String ref) { 48 Ref = ref; 49 } 50 51 private String Inf = ""; 52 53 public String getInf() { 54 return Inf; 55 } 56 57 public void setInf(String inf) { 58 Inf = inf; 59 } 60 61 private String Fixme = ""; 62 63 public String getFixme() { 64 return Fixme; 65 } 66 67 public void setFixme(String name) { 68 Fixme = name; 69 } 70 71 private String LMheight = ""; 72 73 public String getLMheight() { 74 return LMheight; 75 } 76 77 public void setLMheight(String height) { 78 LMheight = height; 79 } 30 80 31 81 private int BuoyIndex = 0; … … 169 219 setBearing2(""); 170 220 setRadius(""); 221 setSeq(""); 171 222 } 172 223 } … … 258 309 Range = new String[10]; 259 310 Range[SectorIndex] = range; 311 } 312 313 private String[] Sequence = new String[10]; 314 315 public String getSeq() { 316 if (Sequence[SectorIndex] == null) 317 return (Sequence[0]); 318 return Sequence[SectorIndex]; 319 } 320 321 public void setSeq(String seq) { 322 if (SectorIndex == 0) 323 Sequence = new String[10]; 324 Sequence[SectorIndex] = seq; 260 325 } 261 326 … … 418 483 if (index != 0) 419 484 setSectored(true); 485 if (key.equals("ref")) 486 setRef(value); 487 if (key.equals("inform")) 488 setInf(value); 420 489 if (key.equals("colour")) { 421 490 if (value.equals("red")) … … 435 504 } else if (key.equals("range")) { 436 505 Range[index] = value; 506 } else if (key.equals("sequence")) { 507 Sequence[index] = value; 508 } else if (key.equals("sector_start")) { 509 Bearing1[index] = value; 510 } else if (key.equals("sector_end")) { 511 Bearing2[index] = value; 437 512 } 438 513 } … … 801 876 String str = dlg.tfM01Name.getText(); 802 877 if (!str.isEmpty()) 803 Main.main.undoRedo.add(new ChangePropertyCommand(Node, "seamark:name", 804 str)); 878 Main.main.undoRedo.add(new ChangePropertyCommand(Node, "seamark:name", str)); 879 if (!Longname.isEmpty()) 880 Main.main.undoRedo.add(new ChangePropertyCommand(Node, "seamark:longname", Longname)); 881 if (!Fixme.isEmpty()) 882 Main.main.undoRedo.add(new ChangePropertyCommand(Node, "seamark:fixme", Fixme)); 805 883 Main.main.undoRedo 806 884 .add(new ChangePropertyCommand(Node, "seamark:type", type)); … … 810 888 String colour; 811 889 if (dlg.cM01Fired.isSelected()) { 812 if (!(colour = LightColour[0]).isEmpty() )890 if (!(colour = LightColour[0]).isEmpty() && !Sectored) 813 891 if (colour.equals("R")) { 814 892 Main.main.undoRedo.add(new ChangePropertyCommand(Node, … … 821 899 "seamark:light:colour", "white")); 822 900 } 901 902 if (!Ref.isEmpty()) 903 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 904 "seamark:light:ref", Ref)); 905 906 if (!Inf.isEmpty()) 907 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 908 "seamark:light:inform", Inf)); 823 909 824 910 if (!LightPeriod[0].isEmpty()) … … 841 927 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 842 928 "seamark:light:range", Range[0])); 929 930 if (!Sequence[0].isEmpty()) 931 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 932 "seamark:light:sequence", Sequence[0])); 843 933 844 934 for (int i = 1; i < 10; i++) { … … 886 976 "seamark:light:" + i + ":height", Height[i])); 887 977 978 if (Sequence[i] != null) 979 Main.main.undoRedo.add(new ChangePropertyCommand(Node, 980 "seamark:light:" + i + ":sequence", Sequence[i])); 981 888 982 if (Range[i] != null) 889 983 Main.main.undoRedo.add(new ChangePropertyCommand(Node, … … 1026 1120 dlg.tfM01Name.setEnabled(false); 1027 1121 setName(""); 1122 setLongname(""); 1123 setFixme(""); 1124 setRef(""); 1125 setInf(""); 1028 1126 dlg.cM01TopMark.setSelected(false); 1029 1127 dlg.cM01TopMark.setVisible(false); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyCard.java
r23410 r25542 56 56 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 57 57 setName(keys.get("seamark:name")); //$NON-NLS-1$ 58 59 if (keys.containsKey("seamark:longname")) //$NON-NLS-1$ 60 setLongname(keys.get("seamark:longname")); //$NON-NLS-1$ 61 62 if (keys.containsKey("seamark:fixme")) //$NON-NLS-1$ 63 setFixme(keys.get("seamark:fixme")); //$NON-NLS-1$ 58 64 59 65 if (keys.containsKey("seamark:buoy_cardinal:name")) //$NON-NLS-1$ -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyIsol.java
r23607 r25542 49 49 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 50 50 setName(keys.get("seamark:name")); //$NON-NLS-1$ 51 52 if (keys.containsKey("seamark:longname")) //$NON-NLS-1$ 53 setLongname(keys.get("seamark:longname")); //$NON-NLS-1$ 54 55 if (keys.containsKey("seamark:fixme")) //$NON-NLS-1$ 56 setFixme(keys.get("seamark:fixme")); //$NON-NLS-1$ 51 57 52 58 if (keys.containsKey("seamark:buoy_isolated_danger:name")) //$NON-NLS-1$ -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyLat.java
r23375 r25542 54 54 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 55 55 setName(keys.get("seamark:name")); //$NON-NLS-1$ 56 57 if (keys.containsKey("seamark:longname")) //$NON-NLS-1$ 58 setLongname(keys.get("seamark:longname")); //$NON-NLS-1$ 59 60 if (keys.containsKey("seamark:fixme")) //$NON-NLS-1$ 61 setFixme(keys.get("seamark:fixme")); //$NON-NLS-1$ 56 62 57 63 if (keys.containsKey("seamark:buoy_lateral:name")) //$NON-NLS-1$ … … 274 280 setStyleIndex(LAT_FLOAT); 275 281 } 282 283 if (keys.containsKey("seamark:buoy_lateral:marsys")) //$NON-NLS-1$ 284 setRegion(keys.get("seamark:buoy_lateral:marsys").equals("B")); //$NON-NLS-1$ 285 else if (keys.containsKey("seamark:beacon_lateral:marsys")) //$NON-NLS-1$ 286 setRegion(keys.get("seamark:beacon_lateral:marsys").equals("B")); //$NON-NLS-1$ 287 else if (keys.containsKey("seamark:light_float:marsys")) //$NON-NLS-1$ 288 setRegion(keys.get("seamark:light_float:marsys").equals("B")); //$NON-NLS-1$ 276 289 277 290 refreshStyles(); … … 913 926 case LAT_BEACON: 914 927 super.saveSign("beacon_lateral"); //$NON-NLS-1$ 915 Main.main.undoRedo.add(new ChangePropertyCommand(node,916 "seamark:beacon_lateral:shape", "stake")); //$NON-NLS-1$ //$NON-NLS-2$917 928 break; 918 929 case LAT_TOWER: … … 999 1010 case LAT_BEACON: 1000 1011 super.saveSign("beacon_lateral"); //$NON-NLS-1$ 1001 Main.main.undoRedo.add(new ChangePropertyCommand(node,1002 "seamark:beacon_lateral:shape", "stake")); //$NON-NLS-1$ //$NON-NLS-2$1003 1012 break; 1004 1013 case LAT_TOWER: … … 1065 1074 default: 1066 1075 } 1076 1077 switch (getStyleIndex()) { 1078 case LAT_CAN: 1079 // case LAT_CONE: 1080 case LAT_PILLAR: 1081 case LAT_SPAR: 1082 Main.main.undoRedo.add(new ChangePropertyCommand(node, 1083 "seamark:buoy_lateral:marsys", (getRegion() ? "B" : "A"))); //$NON-NLS-1$ //$NON-NLS-2$ 1084 break; 1085 case LAT_BEACON: 1086 case LAT_TOWER: 1087 Main.main.undoRedo.add(new ChangePropertyCommand(node, 1088 "seamark:beacon_lateral:marsys", (getRegion() ? "B" : "A"))); //$NON-NLS-1$ //$NON-NLS-2$ 1089 break; 1090 case LAT_FLOAT: 1091 Main.main.undoRedo.add(new ChangePropertyCommand(node, 1092 "seamark:light_float:marsys", (getRegion() ? "B" : "A"))); //$NON-NLS-1$ //$NON-NLS-2$ 1093 break; 1094 } 1095 1067 1096 saveTopMarkData(shape, colour); 1068 1097 saveLightData(); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoyNota.java
r23269 r25542 46 46 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 47 47 setName(keys.get("seamark:name")); //$NON-NLS-1$ 48 49 if (keys.containsKey("seamark:longname")) //$NON-NLS-1$ 50 setLongname(keys.get("seamark:longname")); //$NON-NLS-1$ 51 52 if (keys.containsKey("seamark:fixme")) //$NON-NLS-1$ 53 setFixme(keys.get("seamark:fixme")); //$NON-NLS-1$ 54 55 if (keys.containsKey("seamark:landmark:height")) //$NON-NLS-1$ 56 setLMheight(keys.get("seamark:landmark:height")); //$NON-NLS-1$ 48 57 49 58 if (keys.containsKey("seamark:landmark:name")) //$NON-NLS-1$ … … 151 160 default: 152 161 } 162 if (!getLMheight().isEmpty()) 163 Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:landmark:height", getLMheight())); 153 164 saveLightData(); //$NON-NLS-1$ 154 165 saveRadarFogData(); -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySaw.java
r23295 r25542 48 48 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 49 49 setName(keys.get("seamark:name")); //$NON-NLS-1$ 50 51 if (keys.containsKey("seamark:longname")) //$NON-NLS-1$ 52 setLongname(keys.get("seamark:longname")); //$NON-NLS-1$ 53 54 if (keys.containsKey("seamark:fixme")) //$NON-NLS-1$ 55 setFixme(keys.get("seamark:fixme")); //$NON-NLS-1$ 50 56 51 57 if (keys.containsKey("seamark:buoy_safe_water:name")) //$NON-NLS-1$ -
applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/BuoySpec.java
r23355 r25542 61 61 if (keys.containsKey("seamark:name")) //$NON-NLS-1$ 62 62 setName(keys.get("seamark:name")); //$NON-NLS-1$ 63 64 if (keys.containsKey("seamark:longname")) //$NON-NLS-1$ 65 setLongname(keys.get("seamark:longname")); //$NON-NLS-1$ 66 67 if (keys.containsKey("seamark:fixme")) //$NON-NLS-1$ 68 setFixme(keys.get("seamark:fixme")); //$NON-NLS-1$ 63 69 64 70 if (keys.containsKey("seamark:buoy_special_purpose:name")) //$NON-NLS-1$
Note:
See TracChangeset
for help on using the changeset viewer.