Changeset 27005 in osm for applications/editors/josm/plugins/smed
- Timestamp:
- 2011-11-04T13:13:48+01:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelChr.java
r26999 r27005 102 102 this.add(getChrButton(fixedButton, 0, 16, 44, 16, Messages.getString("FChar"), Chr.FIXED), null); 103 103 this.add(getChrButton(flashButton, 0, 32, 44, 16, Messages.getString("FlChar"), Chr.FLASH), null); 104 this.add(getChrButton(longFlashButton, 0, 48, 44, 16, Messages.getString("LFlChar"), Chr.L ONGFLASH), null);104 this.add(getChrButton(longFlashButton, 0, 48, 44, 16, Messages.getString("LFlChar"), Chr.LFLASH), null); 105 105 this.add(getChrButton(quickButton, 0, 64, 44, 16, Messages.getString("QChar"), Chr.QUICK), null); 106 this.add(getChrButton(veryQuickButton, 0, 80, 44, 16, Messages.getString("VQChar"), Chr.V ERYQUICK), null);107 this.add(getChrButton(ultraQuickButton, 0, 96, 44, 16, Messages.getString("UQChar"), Chr.U LTRAQUICK), null);106 this.add(getChrButton(veryQuickButton, 0, 80, 44, 16, Messages.getString("VQChar"), Chr.VQUICK), null); 107 this.add(getChrButton(ultraQuickButton, 0, 96, 44, 16, Messages.getString("UQChar"), Chr.UQUICK), null); 108 108 this.add(getChrButton(alternatingButton, 44, 0, 44, 16, Messages.getString("AlChar"), Chr.ALTERNATING), null); 109 109 this.add(getChrButton(isophasedButton, 44, 16, 44, 16, Messages.getString("IsoChar"), Chr.ISOPHASED), null); 110 110 this.add(getChrButton(occultingButton, 44, 32, 44, 16, Messages.getString("OcChar"), Chr.OCCULTING), null); 111 111 this.add(getChrButton(morseButton, 44, 48, 44, 16, Messages.getString("MoChar"), Chr.MORSE), null); 112 this.add(getChrButton(interruptedQuickButton, 44, 64, 44, 16, Messages.getString("IQChar"), Chr.INTERRUPTEDQUICK), null); 113 this.add(getChrButton(interruptedVeryQuickButton, 44, 80, 44, 16, Messages.getString("IVQChar"), Chr.INTERRUPTEDVERYQUICK), 114 null); 115 this.add(getChrButton(interruptedUltraQuickButton, 44, 96, 44, 16, Messages.getString("IUQChar"), Chr.INTERRUPTEDULTRAQUICK), 112 this.add(getChrButton(interruptedQuickButton, 44, 64, 44, 16, Messages.getString("IQChar"), Chr.IQUICK), null); 113 this.add(getChrButton(interruptedVeryQuickButton, 44, 80, 44, 16, Messages.getString("IVQChar"), Chr.IVQUICK),null); 114 this.add(getChrButton(interruptedUltraQuickButton, 44, 96, 44, 16, Messages.getString("IUQChar"), Chr.IUQUICK), 116 115 null); 117 116 charLabel.setBounds(new Rectangle(0, 113, 88, 20)); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLit.java
r27000 r27005 5 5 import java.awt.*; 6 6 import java.awt.event.*; 7 import java.util.EnumMap; 7 8 8 9 import oseam.Messages; … … 39 40 public JLabel visibilityLabel; 40 41 public JComboBox visibilityBox; 42 public EnumMap<Vis, Integer> visibilities = new EnumMap<Vis, Integer>(Vis.class); 41 43 private ActionListener alVisibility = new ActionListener() { 42 44 public void actionPerformed(java.awt.event.ActionEvent e) { … … 72 74 public JLabel exhibitionLabel; 73 75 public JComboBox exhibitionBox; 76 public EnumMap<Exh, Integer> exhibitions = new EnumMap<Exh, Integer>(Exh.class); 74 77 private ActionListener alExhibition = new ActionListener() { 75 78 public void actionPerformed(java.awt.event.ActionEvent e) { … … 179 182 this.add(visibilityBox, null); 180 183 visibilityBox.addActionListener(alVisibility); 181 visibilityBox.addItem(Messages.getString("NoneSpecified"));182 visibilityBox.addItem(Messages.getString("Intensified"));183 visibilityBox.addItem(Messages.getString("Unintensified"));184 visibilityBox.addItem(Messages.getString("PartiallyObscured"));184 addVisibItem(Messages.getString("NoneSpecified"), Vis.UNKNOWN); 185 addVisibItem(Messages.getString("Intensified"), Vis.INTEN); 186 addVisibItem(Messages.getString("Unintensified"), Vis.UNINTEN); 187 addVisibItem(Messages.getString("PartiallyObscured"), Vis.PARTOBS); 185 188 186 189 exhibitionLabel = new JLabel(Messages.getString("Exhibition"), SwingConstants.CENTER); … … 191 194 this.add(exhibitionBox, null); 192 195 exhibitionBox.addActionListener(alExhibition); 193 exhibitionBox.addItem("-");194 exhibitionBox.addItem(Messages.getString("24h"));195 exhibitionBox.addItem(Messages.getString("Day"));196 exhibitionBox.addItem(Messages.getString("Night"));197 exhibitionBox.addItem(Messages.getString("Fog"));196 addExhibItem(Messages.getString("NotSet"), Exh.UNKNOWN); 197 addExhibItem(Messages.getString("24h"), Exh.H24); 198 addExhibItem(Messages.getString("Day"), Exh.DAY); 199 addExhibItem(Messages.getString("Night"), Exh.NIGHT); 200 addExhibItem(Messages.getString("Fog"), Exh.FOG); 198 201 199 202 orientationLabel = new JLabel(Messages.getString("Orientation"), SwingConstants.CENTER); … … 210 213 } 211 214 215 private void addVisibItem(String str, Vis vis) { 216 visibilities.put(vis, visibilityBox.getItemCount()); 217 visibilityBox.addItem(str); 218 } 219 220 private void addExhibItem(String str, Exh exh) { 221 exhibitions.put(exh, exhibitionBox.getItemCount()); 222 exhibitionBox.addItem(str); 223 } 224 212 225 private JRadioButton getTypeButton(JRadioButton button, int x, int y, int w, int h, String tip) { 213 226 button.setBounds(new Rectangle(x, y, w, h)); -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMore.java
r26998 r27005 67 67 } 68 68 }; 69 public JLabel visLabel;70 public JComboBox visBox;71 public EnumMap< Vis, Integer> visibilities = new EnumMap<Vis, Integer>(Vis.class);72 private ActionListener al Vis= new ActionListener() {73 public void actionPerformed(java.awt.event.ActionEvent e) { 74 for ( Vis vis : visibilities.keySet()) {75 int idx = visibilities.get(vis);76 if (dlg.mark != null && (idx == visBox.getSelectedIndex()))77 dlg.mark.set Vis(vis);69 public JLabel conLabel; 70 public JComboBox conBox; 71 public EnumMap<Con, Integer> conspicuities = new EnumMap<Con, Integer>(Con.class); 72 private ActionListener alCon = new ActionListener() { 73 public void actionPerformed(java.awt.event.ActionEvent e) { 74 for (Con con : conspicuities.keySet()) { 75 int idx = conspicuities.get(con); 76 if (dlg.mark != null && (idx == conBox.getSelectedIndex())) 77 dlg.mark.setCon(con); 78 78 } 79 79 } … … 81 81 public JLabel reflLabel; 82 82 public JComboBox reflBox; 83 public EnumMap< Vis, Integer> reflectivities = new EnumMap<Vis, Integer>(Vis.class);83 public EnumMap<Con, Integer> reflectivities = new EnumMap<Con, Integer>(Con.class); 84 84 private ActionListener alRefl = new ActionListener() { 85 85 public void actionPerformed(java.awt.event.ActionEvent e) { 86 for ( Vis vis: reflectivities.keySet()) {87 int idx = reflectivities.get( vis);86 for (Con con : reflectivities.keySet()) { 87 int idx = reflectivities.get(con); 88 88 if (dlg.mark != null && (idx == reflBox.getSelectedIndex())) 89 dlg.mark.setR vis(vis);89 dlg.mark.setRefl(con); 90 90 } 91 91 } … … 272 272 constrBox.addActionListener(alConstr); 273 273 274 visLabel = new JLabel(Messages.getString("Visibility"), SwingConstants.CENTER);275 visLabel.setBounds(new Rectangle(250, 80, 100, 20));276 this.add( visLabel, null);277 visBox = new JComboBox();278 visBox.setBounds(new Rectangle(250, 100, 100, 20));279 add VisItem(Messages.getString("NotSet"), Vis.UNKNOWN);280 add VisItem(Messages.getString("Conspicuous"), Vis.CONSP);281 add VisItem(Messages.getString("NotConspicuous"), Vis.NCONS);282 this.add( visBox, null);283 visBox.addActionListener(alVis);274 conLabel = new JLabel(Messages.getString("Visibility"), SwingConstants.CENTER); 275 conLabel.setBounds(new Rectangle(250, 80, 100, 20)); 276 this.add(conLabel, null); 277 conBox = new JComboBox(); 278 conBox.setBounds(new Rectangle(250, 100, 100, 20)); 279 addConItem(Messages.getString("NotSet"), Con.UNKNOWN); 280 addConItem(Messages.getString("Conspicuous"), Con.CONSP); 281 addConItem(Messages.getString("NotConspicuous"), Con.NCONS); 282 this.add(conBox, null); 283 conBox.addActionListener(alCon); 284 284 285 285 reflLabel = new JLabel(Messages.getString("Reflectivity"), SwingConstants.CENTER); … … 288 288 reflBox = new JComboBox(); 289 289 reflBox.setBounds(new Rectangle(250, 140, 100, 20)); 290 addR vsItem(Messages.getString("NotSet"), Vis.UNKNOWN);291 addR vsItem(Messages.getString("Conspicuous"), Vis.CONSP);292 addR vsItem(Messages.getString("NotConspicuous"), Vis.NCONS);293 addR vsItem(Messages.getString("Reflector"), Vis.REFL);290 addReflItem(Messages.getString("NotSet"), Con.UNKNOWN); 291 addReflItem(Messages.getString("Conspicuous"), Con.CONSP); 292 addReflItem(Messages.getString("NotConspicuous"), Con.NCONS); 293 addReflItem(Messages.getString("Reflector"), Con.REFL); 294 294 this.add(reflBox, null); 295 295 reflBox.addActionListener(alRefl); … … 318 318 constrBox.setSelectedIndex(item); 319 319 } 320 visBox.setSelectedIndex(0);321 for ( Vis vis : visibilities.keySet()) {322 int item = visibilities.get(vis);323 if (dlg.mark.get Vis() == vis)324 visBox.setSelectedIndex(item);320 conBox.setSelectedIndex(0); 321 for (Con con : conspicuities.keySet()) { 322 int item = conspicuities.get(con); 323 if (dlg.mark.getCon() == con) 324 conBox.setSelectedIndex(item); 325 325 } 326 326 reflBox.setSelectedIndex(0); 327 for ( Vis vis: reflectivities.keySet()) {328 int item = reflectivities.get( vis);329 if (dlg.mark.getR vis() == vis)327 for (Con con : reflectivities.keySet()) { 328 int item = reflectivities.get(con); 329 if (dlg.mark.getRefl() == con) 330 330 reflBox.setSelectedIndex(item); 331 331 } … … 342 342 } 343 343 344 private void add VisItem(String str, Vis vis) {345 visibilities.put(vis, visBox.getItemCount());346 visBox.addItem(str);347 } 348 349 private void addR vsItem(String str, Vis vis) {350 reflectivities.put( vis, reflBox.getItemCount());344 private void addConItem(String str, Con con) { 345 conspicuities.put(con, conBox.getItemCount()); 346 conBox.addItem(str); 347 } 348 349 private void addReflItem(String str, Con con) { 350 reflectivities.put(con, reflBox.getItemCount()); 351 351 reflBox.addItem(str); 352 352 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r27000 r27005 55 55 56 56 public enum Obj { 57 UNKNOWN, BCNCAR, BCNISD, BCNLAT, BCNSAW, BCNSPP, BOYCAR, BOYISD, BOYLAT, BOYSAW, BOYSPP, FLTCAR, FLTISD, FLTLAT, FLTSAW, FLTSPP, LITMAJ, LITMIN, LITFLT, LITVES, LNDMRK, MORFAC, SISTAW, SISTAT 57 UNKNOWN, BCNCAR, BCNISD, BCNLAT, BCNSAW, BCNSPP, BOYCAR, BOYISD, BOYLAT, BOYSAW, BOYSPP, 58 FLTCAR, FLTISD, FLTLAT, FLTSAW, FLTSPP, LITMAJ, LITMIN, LITFLT, LITVES, 59 LNDMRK, MORFAC, SISTAW, SISTAT 58 60 } 59 61 … … 159 161 160 162 public enum Cat { 161 NONE, LAM_PORT, LAM_STBD, LAM_PPORT, LAM_PSTBD, CAM_NORTH, CAM_EAST, CAM_SOUTH, CAM_WEST, ACH_URST, ACH_DEEP, ACH_TANK, ACH_EXPL, ACH_QUAR, ACH_SPLN, ACH_SCAN, ACH_SCMO, ACH_T24H, ACH_TLIM, SPM_UNKN, SPM_WARN, SPM_CHBF, SPM_YCHT, SPM_CABL, SPM_OFAL, SPM_ODAS, SPM_RECN, SPM_MOOR, SPM_LNBY, SPM_LDNG, SPM_NOTC, SPM_TSS, SPM_FOUL, SPM_DIVE, SPM_FRRY, SPM_ANCH, MOR_DLPN, MOR_DDPN, MOR_BLRD, MOR_WALL, MOR_POST, MOR_CHWR, MOR_BUOY, SIS_PTCL, SIS_PTED, SIS_IPT, SIS_BRTH, SIS_DOCK, SIS_LOCK, SIS_FBAR, SIS_BRDG, SIS_DRDG, SIS_TRFC, SIS_DNGR, SIS_OBST, SIS_CABL, SIS_MILY, SIS_DSTR, SIS_WTHR, SIS_STRM, SIS_ICE, SIS_TIME, SIS_TIDE, SIS_TSTM, SIS_TGAG, SIS_TSCL, SIS_DIVE, SIS_LGAG, LIT_DIRF, LIT_LEDG 163 NONE, LAM_PORT, LAM_STBD, LAM_PPORT, LAM_PSTBD, CAM_NORTH, CAM_EAST, CAM_SOUTH, CAM_WEST, 164 ACH_URST, ACH_DEEP, ACH_TANK, ACH_EXPL, ACH_QUAR, ACH_SPLN, ACH_SCAN, ACH_SCMO, ACH_T24H, ACH_TLIM, 165 SPM_UNKN, SPM_WARN, SPM_CHBF, SPM_YCHT, SPM_CABL, SPM_OFAL, SPM_ODAS, SPM_RECN, SPM_MOOR, SPM_LNBY, 166 SPM_LDNG, SPM_NOTC, SPM_TSS, SPM_FOUL, SPM_DIVE, SPM_FRRY, 167 SPM_ANCH, MOR_DLPN, MOR_DDPN, MOR_BLRD, MOR_WALL, MOR_POST, MOR_CHWR, MOR_BUOY, 168 SIS_PTCL, SIS_PTED, SIS_IPT, SIS_BRTH, SIS_DOCK, SIS_LOCK, SIS_FBAR, SIS_BRDG, SIS_DRDG, SIS_TRFC, 169 SIS_DNGR, SIS_OBST, SIS_CABL, SIS_MILY, SIS_DSTR, SIS_WTHR, SIS_STRM, SIS_ICE, SIS_TIME, SIS_TIDE, 170 SIS_TSTM, SIS_TGAG, SIS_TSCL, SIS_DIVE, SIS_LGAG, LIT_DIRF, LIT_LEDG 162 171 } 163 172 … … 234 243 235 244 public enum Shp { 236 UNKNOWN, PILLAR, SPAR, CAN, CONE, SPHERE, BARREL, FLOAT, SUPER, BUOYANT, CAIRN, PILE, LATTICE, TOWER, STAKE, POLE, POST, PERCH, BUOY, BEACON 245 UNKNOWN, PILLAR, SPAR, CAN, CONE, SPHERE, BARREL, FLOAT, SUPER, 246 BUOYANT, CAIRN, PILE, LATTICE, TOWER, STAKE, POLE, POST, PERCH, BUOY, BEACON 237 247 } 238 248 … … 447 457 448 458 public enum Chr { 449 UNKNOWN, FIXED, FLASH, LONGFLASH, QUICK, VERYQUICK, ULTRAQUICK, ISOPHASED, OCCULTING, MORSE, ALTERNATING, INTERRUPTEDQUICK, INTERRUPTEDVERYQUICK, INTERRUPTEDULTRAQUICK 459 UNKNOWN, FIXED, FLASH, LFLASH, QUICK, VQUICK, UQUICK, ISOPHASED, OCCULTING, 460 MORSE, ALTERNATING, IQUICK, IVQUICK, IUQUICK 450 461 } 451 462 … … 455 466 ChrMAP.put(EnumSet.of(Chr.FIXED), "F"); 456 467 ChrMAP.put(EnumSet.of(Chr.FLASH), "Fl"); 457 ChrMAP.put(EnumSet.of(Chr.L ONGFLASH), "LFl");468 ChrMAP.put(EnumSet.of(Chr.LFLASH), "LFl"); 458 469 ChrMAP.put(EnumSet.of(Chr.QUICK), "Q"); 459 ChrMAP.put(EnumSet.of(Chr.V ERYQUICK), "VQ");460 ChrMAP.put(EnumSet.of(Chr.U LTRAQUICK), "UQ");461 ChrMAP.put(EnumSet.of(Chr.I NTERRUPTEDQUICK), "IQ");462 ChrMAP.put(EnumSet.of(Chr.I NTERRUPTEDVERYQUICK), "IVQ");463 ChrMAP.put(EnumSet.of(Chr.I NTERRUPTEDULTRAQUICK), "IUQ");470 ChrMAP.put(EnumSet.of(Chr.VQUICK), "VQ"); 471 ChrMAP.put(EnumSet.of(Chr.UQUICK), "UQ"); 472 ChrMAP.put(EnumSet.of(Chr.IQUICK), "IQ"); 473 ChrMAP.put(EnumSet.of(Chr.IVQUICK), "IVQ"); 474 ChrMAP.put(EnumSet.of(Chr.IUQUICK), "IUQ"); 464 475 ChrMAP.put(EnumSet.of(Chr.ISOPHASED), "Iso"); 465 476 ChrMAP.put(EnumSet.of(Chr.OCCULTING), "Oc"); … … 469 480 ChrMAP.put(EnumSet.of(Chr.ALTERNATING, Chr.FLASH), "Al.Fl"); 470 481 ChrMAP.put(EnumSet.of(Chr.ALTERNATING, Chr.FIXED, Chr.FLASH), "F.Al.Fl"); 471 ChrMAP.put(EnumSet.of(Chr.ALTERNATING, Chr.L ONGFLASH), "Al.LFl");482 ChrMAP.put(EnumSet.of(Chr.ALTERNATING, Chr.LFLASH), "Al.LFl"); 472 483 ChrMAP.put(EnumSet.of(Chr.ALTERNATING, Chr.ISOPHASED), "Al.Iso"); 473 484 ChrMAP.put(EnumSet.of(Chr.ALTERNATING, Chr.OCCULTING), "Al.Oc"); 474 485 ChrMAP.put(EnumSet.of(Chr.FIXED, Chr.FLASH), "FFl"); 475 ChrMAP.put(EnumSet.of(Chr.FIXED, Chr.L ONGFLASH), "FLFl");486 ChrMAP.put(EnumSet.of(Chr.FIXED, Chr.LFLASH), "FLFl"); 476 487 ChrMAP.put(EnumSet.of(Chr.OCCULTING, Chr.FLASH), "OcFl"); 477 ChrMAP.put(EnumSet.of(Chr.FLASH, Chr.L ONGFLASH), "FlLFl");478 ChrMAP.put(EnumSet.of(Chr.QUICK, Chr.L ONGFLASH), "Q+LFl");479 ChrMAP.put(EnumSet.of(Chr.V ERYQUICK, Chr.LONGFLASH), "VQ+LFl");480 ChrMAP.put(EnumSet.of(Chr.U LTRAQUICK, Chr.LONGFLASH), "UQ+LFl");488 ChrMAP.put(EnumSet.of(Chr.FLASH, Chr.LFLASH), "FlLFl"); 489 ChrMAP.put(EnumSet.of(Chr.QUICK, Chr.LFLASH), "Q+LFl"); 490 ChrMAP.put(EnumSet.of(Chr.VQUICK, Chr.LFLASH), "VQ+LFl"); 491 ChrMAP.put(EnumSet.of(Chr.UQUICK, Chr.LFLASH), "UQ+LFl"); 481 492 } 482 493 … … 745 756 } 746 757 758 public enum Vis { 759 UNKNOWN, HIGH, LOW, FAINT, INTEN, UNINTEN, REST, OBS, PARTOBS 760 } 761 762 public static final Map<EnumSet<Vis>, String> VisMAP = new HashMap<EnumSet<Vis>, String>(); 763 static { 764 VisMAP.put(EnumSet.of(Vis.UNKNOWN), ""); 765 VisMAP.put(EnumSet.of(Vis.HIGH), "high"); 766 VisMAP.put(EnumSet.of(Vis.LOW), "low"); 767 VisMAP.put(EnumSet.of(Vis.FAINT), "faint"); 768 VisMAP.put(EnumSet.of(Vis.INTEN), "intensified"); 769 VisMAP.put(EnumSet.of(Vis.UNINTEN), "unintensified"); 770 VisMAP.put(EnumSet.of(Vis.REST), "restricted"); 771 VisMAP.put(EnumSet.of(Vis.OBS), "obscured"); 772 VisMAP.put(EnumSet.of(Vis.PARTOBS), "part_obscured"); 773 } 774 775 public enum Lit { 776 UNKNOWN, VERT, VERT2, VERT3, VERT4, HORIZ, HORIZ2, HORIZ3, HORIZ4, UPPER, LOWER, REAR, FRONT, AERO, AIROBS, FOGDET, FLOOD, STRIP, SUBS, SPOT, MOIRE, EMERG, BEAR 777 } 778 779 public static final Map<EnumSet<Lit>, String> LitMAP = new HashMap<EnumSet<Lit>, String>(); 780 static { 781 LitMAP.put(EnumSet.of(Lit.UNKNOWN), ""); 782 } 783 784 public enum Exh { UNKNOWN, H24, DAY, NIGHT, FOG } 785 public static final Map<EnumSet<Exh>, String> ExhMAP = new HashMap<EnumSet<Exh>, String>(); 786 static { 787 ExhMAP.put(EnumSet.of(Exh.UNKNOWN), ""); 788 ExhMAP.put(EnumSet.of(Exh.H24), "24h"); 789 ExhMAP.put(EnumSet.of(Exh.DAY), "day"); 790 ExhMAP.put(EnumSet.of(Exh.NIGHT), "night"); 791 ExhMAP.put(EnumSet.of(Exh.FOG), "fog"); 792 } 793 747 794 public enum Pat { 748 795 NONE, HORIZ, VERT, DIAG, SQUARE, BORDER … … 1058 1105 } 1059 1106 1060 public enum Vis{1107 public enum Con { 1061 1108 UNKNOWN, CONSP, NCONS, REFL 1062 1109 } 1063 1110 1064 public static final EnumMap< Vis, String> VisSTR = new EnumMap<Vis, String>(Vis.class);1111 public static final EnumMap<Con, String> ConSTR = new EnumMap<Con, String>(Con.class); 1065 1112 static { 1066 VisSTR.put(Vis.CONSP, "conspicuous");1067 VisSTR.put(Vis.NCONS, "not_conspicuous");1068 VisSTR.put(Vis.REFL, "reflector");1069 } 1070 1071 private Vis visibility = Vis.UNKNOWN;1072 1073 public Vis getVis() {1074 return visibility;1075 } 1076 1077 public void set Vis(Vis vis) {1078 visibility = vis;1079 } 1080 1081 private Vis reflectivity = Vis.UNKNOWN;1082 1083 public Vis getRvis() {1113 ConSTR.put(Con.CONSP, "conspicuous"); 1114 ConSTR.put(Con.NCONS, "not_conspicuous"); 1115 ConSTR.put(Con.REFL, "reflector"); 1116 } 1117 1118 private Con conspicuity = Con.UNKNOWN; 1119 1120 public Con getCon() { 1121 return conspicuity; 1122 } 1123 1124 public void setCon(Con con) { 1125 conspicuity = con; 1126 } 1127 1128 private Con reflectivity = Con.UNKNOWN; 1129 1130 public Con getRefl() { 1084 1131 return reflectivity; 1085 1132 } 1086 1133 1087 public void setR vis(Vis vis) {1088 reflectivity = vis;1134 public void setRefl(Con con) { 1135 reflectivity = con; 1089 1136 } 1090 1137 … … 1499 1546 } 1500 1547 } 1501 if (keys.containsKey("seamark: visibility")) {1502 str = keys.get("seamark: visibility");1503 set Vis(Vis.UNKNOWN);1504 for ( Vis vis : VisSTR.keySet()) {1505 if ( VisSTR.get(vis).equals(str)) {1506 set Vis(vis);1548 if (keys.containsKey("seamark:conspicuity")) { 1549 str = keys.get("seamark:conspicuity"); 1550 setCon(Con.UNKNOWN); 1551 for (Con con : ConSTR.keySet()) { 1552 if (ConSTR.get(con).equals(str)) { 1553 setCon(con); 1507 1554 } 1508 1555 } … … 1510 1557 if (keys.containsKey("seamark:reflectivity")) { 1511 1558 str = keys.get("seamark:reflectivity"); 1512 setR vis(Vis.UNKNOWN);1513 for ( Vis vis : VisSTR.keySet()) {1514 if ( VisSTR.get(vis).equals(str)) {1515 setR vis(vis);1559 setRefl(Con.UNKNOWN); 1560 for (Con con : ConSTR.keySet()) { 1561 if (ConSTR.get(con).equals(str)) { 1562 setRefl(con); 1516 1563 } 1517 1564 } … … 1917 1964 Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:construction", CnsSTR.get(getConstr()))); 1918 1965 } 1919 if (get Vis() != Vis.UNKNOWN) {1920 Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark: visibility", VisSTR.get(getVis())));1921 } 1922 if (getR vis() != Vis.UNKNOWN) {1923 Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:reflectivity", VisSTR.get(getRvis())));1966 if (getCon() != Con.UNKNOWN) { 1967 Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:conspicuity", ConSTR.get(getCon()))); 1968 } 1969 if (getRefl() != Con.UNKNOWN) { 1970 Main.main.undoRedo.add(new ChangePropertyCommand(node, "seamark:reflectivity", ConSTR.get(getRefl()))); 1924 1971 } 1925 1972 }
Note:
See TracChangeset
for help on using the changeset viewer.