Changeset 25542 in osm for applications/editors/josm/plugins/toms/src/toms/seamarks/buoys/Buoy.java
- Timestamp:
- 2011-03-08T13:34:45+01:00 (14 years ago)
- File:
-
- 1 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);
Note:
See TracChangeset
for help on using the changeset viewer.