Changeset 26908 in osm for applications
- Timestamp:
- 2011-10-19T16:43:25+02:00 (13 years ago)
- Location:
- applications/editors/josm/plugins/smed/plugs/oseam/src/oseam
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages.properties
r26903 r26908 180 180 181 181 NotSet=Not set 182 183 Permanent=Permanent 184 Occasional=Occasional 185 Recommended=Recommended 186 NotInUse=Not in use 187 Intermittent=Intermittent 188 Reserved=Reserved 189 Temporary=Temporary 190 Private=Private 191 Mandatory=Mandatory 192 Destroyed=Destroyed 193 Extinguished=Extinguished 194 Illuminated=Illuminated 195 Historic=Historic 196 Public=Public 197 Synchronized=Synchronized 198 Watched=Watched 199 UnWatched=Unwatched 200 Doubtful=Existence Doubtful 201 202 Masonry=Masonry 203 Concreted=Concreted 204 Boulders=Loose boulders 205 HardSurfaced=Hard surfaced 206 Unsurfaced=Unsurfaced 207 Wooden=Wooden 208 Metal=Metal 209 GRP=GRP 210 Painted=Painted 211 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java
r26903 r26908 79 79 } 80 80 } 81 } else { 82 stack.repaint(); 81 83 } 82 84 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java
r26881 r26908 228 228 return; 229 229 else 230 dlg.mark.setName(nameBox.getText() );230 dlg.mark.setName(nameBox.getText().trim()); 231 231 } 232 232 }; -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMore.java
r26903 r26908 23 23 if (dlg.mark == null) 24 24 return; 25 else 26 dlg.mark.setInfo(infoBox.getText().trim()); 25 27 } 26 28 }; … … 31 33 if (dlg.mark == null) 32 34 return; 35 else 36 dlg.mark.setSource(sourceBox.getText().trim()); 33 37 } 34 38 }; … … 63 67 public JLabel constrLabel; 64 68 public JComboBox constrBox; 69 public EnumMap<Cns, Integer> constructions = new EnumMap<Cns, Integer>(Cns.class); 65 70 private ActionListener alConstr = new ActionListener() { 66 71 public void actionPerformed(java.awt.event.ActionEvent e) { 67 if (dlg.mark == null) 68 return; 72 for (Cns cns : constructions.keySet()) { 73 int idx = constructions.get(cns); 74 if (dlg.mark != null && (idx == constrBox.getSelectedIndex())) 75 dlg.mark.setConstr(cns); 76 } 69 77 } 70 78 }; 71 79 public JLabel visLabel; 72 80 public JComboBox visBox; 81 public EnumMap<Vis, Integer> visibilities = new EnumMap<Vis, Integer>(Vis.class); 73 82 private ActionListener alVis = new ActionListener() { 74 83 public void actionPerformed(java.awt.event.ActionEvent e) { 75 if (dlg.mark == null) 76 return; 77 } 78 }; 79 public JLabel conspLabel; 80 public JComboBox conspBox; 81 private ActionListener alConsp = new ActionListener() { 82 public void actionPerformed(java.awt.event.ActionEvent e) { 83 if (dlg.mark == null) 84 return; 84 for (Vis vis : visibilities.keySet()) { 85 int idx = visibilities.get(vis); 86 if (dlg.mark != null && (idx == visBox.getSelectedIndex())) 87 dlg.mark.setVis(vis); 88 } 89 } 90 }; 91 public JLabel reflLabel; 92 public JComboBox reflBox; 93 public EnumMap<Vis, Integer> reflectivities = new EnumMap<Vis, Integer>(Vis.class); 94 private ActionListener alRefl = new ActionListener() { 95 public void actionPerformed(java.awt.event.ActionEvent e) { 96 for (Vis vis : reflectivities.keySet()) { 97 int idx = reflectivities.get(vis); 98 if (dlg.mark != null && (idx == reflBox.getSelectedIndex())) 99 dlg.mark.setRvis(vis); 100 } 85 101 } 86 102 }; … … 228 244 statusBox.setBounds(new Rectangle(250, 20, 100, 20)); 229 245 addStsItem(Messages.getString("NotSet"), Sts.UNKNOWN); 246 addStsItem(Messages.getString("Permanent"), Sts.PERM); 247 addStsItem(Messages.getString("Occasional"), Sts.OCC); 248 addStsItem(Messages.getString("Recommended"), Sts.REC); 249 addStsItem(Messages.getString("NotInUse"), Sts.NIU); 250 addStsItem(Messages.getString("Intermittent"), Sts.INT); 251 addStsItem(Messages.getString("Reserved"), Sts.RESV); 252 addStsItem(Messages.getString("Temporary"), Sts.TEMP); 253 addStsItem(Messages.getString("Private"), Sts.PRIV); 254 addStsItem(Messages.getString("Mandatory"), Sts.MAND); 255 addStsItem(Messages.getString("Destroyed"), Sts.DEST); 256 addStsItem(Messages.getString("Extinguished"), Sts.EXT); 257 addStsItem(Messages.getString("Illuminated"), Sts.ILLUM); 258 addStsItem(Messages.getString("Historic"), Sts.HIST); 259 addStsItem(Messages.getString("Public"), Sts.PUB); 260 addStsItem(Messages.getString("Synchronized"), Sts.SYNC); 261 addStsItem(Messages.getString("Watched"), Sts.WATCH); 262 addStsItem(Messages.getString("UnWatched"), Sts.UNWAT); 263 addStsItem(Messages.getString("Doubtful"), Sts.DOUBT); 230 264 this.add(statusBox, null); 231 265 statusBox.addActionListener(alStatus); … … 236 270 constrBox = new JComboBox(); 237 271 constrBox.setBounds(new Rectangle(250, 60, 100, 20)); 272 addCnsItem(Messages.getString("NotSet"), Cns.UNKNOWN); 273 addCnsItem(Messages.getString("Masonry"), Cns.BRICK); 274 addCnsItem(Messages.getString("Concreted"), Cns.CONC); 275 addCnsItem(Messages.getString("Boulders"), Cns.BOULD); 276 addCnsItem(Messages.getString("HardSurfaced"), Cns.HSURF); 277 addCnsItem(Messages.getString("Unsurfaced"), Cns.USURF); 278 addCnsItem(Messages.getString("Wooden"), Cns.WOOD); 279 addCnsItem(Messages.getString("Metal"), Cns.METAL); 280 addCnsItem(Messages.getString("GRP"), Cns.GRP); 281 addCnsItem(Messages.getString("Painted"), Cns.PAINT); 238 282 this.add(constrBox, null); 239 283 constrBox.addActionListener(alConstr); 240 284 241 conspLabel = new JLabel(Messages.getString("Reflectivity"), SwingConstants.CENTER);242 conspLabel.setBounds(new Rectangle(250, 80, 100, 20));243 this.add(conspLabel, null);244 conspBox = new JComboBox();245 conspBox.setBounds(new Rectangle(250, 100, 100, 20));246 this.add(conspBox, null);247 conspBox.addActionListener(alConsp);248 249 285 visLabel = new JLabel(Messages.getString("Visibility"), SwingConstants.CENTER); 250 visLabel.setBounds(new Rectangle(250, 120, 100, 20));286 visLabel.setBounds(new Rectangle(250, 80, 100, 20)); 251 287 this.add(visLabel, null); 252 288 visBox = new JComboBox(); 253 visBox.setBounds(new Rectangle(250, 140, 100, 20)); 289 visBox.setBounds(new Rectangle(250, 100, 100, 20)); 290 addVisItem(Messages.getString("NotSet"), Vis.UNKNOWN); 291 addVisItem(Messages.getString("Conspicuous"), Vis.CONSP); 292 addVisItem(Messages.getString("NotConspicuous"), Vis.NCONS); 254 293 this.add(visBox, null); 255 294 visBox.addActionListener(alVis); 295 296 reflLabel = new JLabel(Messages.getString("Reflectivity"), SwingConstants.CENTER); 297 reflLabel.setBounds(new Rectangle(250, 120, 100, 20)); 298 this.add(reflLabel, null); 299 reflBox = new JComboBox(); 300 reflBox.setBounds(new Rectangle(250, 140, 100, 20)); 301 addRvsItem(Messages.getString("NotSet"), Vis.UNKNOWN); 302 addRvsItem(Messages.getString("Conspicuous"), Vis.CONSP); 303 addRvsItem(Messages.getString("NotConspicuous"), Vis.NCONS); 304 addRvsItem(Messages.getString("Reflector"), Vis.REFL); 305 this.add(reflBox, null); 306 reflBox.addActionListener(alRefl); 256 307 257 308 } … … 264 315 statuses.put(sts, statusBox.getItemCount()); 265 316 statusBox.addItem(str); 317 } 318 319 private void addCnsItem(String str, Cns cns) { 320 constructions.put(cns, constrBox.getItemCount()); 321 constrBox.addItem(str); 322 } 323 324 private void addVisItem(String str, Vis vis) { 325 visibilities.put(vis, visBox.getItemCount()); 326 visBox.addItem(str); 327 } 328 329 private void addRvsItem(String str, Vis vis) { 330 reflectivities.put(vis, reflBox.getItemCount()); 331 reflBox.addItem(str); 266 332 } 267 333 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r26903 r26908 660 660 } 661 661 662 public enum Cns { 663 UNKNOWN, BRICK, CONC, BOULD, HSURF, USURF, WOOD, METAL, GRP, PAINT 664 } 665 666 public static final EnumMap<Cns, String> CnsSTR = new EnumMap<Cns, String>(Cns.class); 667 static { 668 CnsSTR.put(Cns.BRICK, "masonry"); 669 CnsSTR.put(Cns.CONC, "concreted"); 670 CnsSTR.put(Cns.BOULD, "boulders"); 671 CnsSTR.put(Cns.HSURF, "hard_surfaced"); 672 CnsSTR.put(Cns.USURF, "unsurfaced"); 673 CnsSTR.put(Cns.WOOD, "wooden"); 674 CnsSTR.put(Cns.METAL, "metal"); 675 CnsSTR.put(Cns.GRP, "grp"); 676 CnsSTR.put(Cns.PAINT, "painted"); 677 } 678 679 private Cns construction = Cns.UNKNOWN; 680 681 public Cns getConstr() { 682 return construction; 683 } 684 685 public void setConstr(Cns cns) { 686 construction = cns; 687 } 688 689 public enum Vis { 690 UNKNOWN, CONSP, NCONS, REFL 691 } 692 693 public static final EnumMap<Vis, String> VisSTR = new EnumMap<Vis, String>(Vis.class); 694 static { 695 VisSTR.put(Vis.CONSP, "conspicuous"); 696 VisSTR.put(Vis.NCONS, "not_conspicuous"); 697 VisSTR.put(Vis.REFL, "reflector"); 698 } 699 700 private Vis visibility = Vis.UNKNOWN; 701 702 public Vis getVis() { 703 return visibility; 704 } 705 706 public void setVis(Vis vis) { 707 visibility = vis; 708 } 709 710 private Vis reflectivity = Vis.UNKNOWN; 711 712 public Vis getRvis() { 713 return reflectivity; 714 } 715 716 public void setRvis(Vis vis) { 717 reflectivity = vis; 718 } 719 720 public String information = ""; 721 722 public String getInfo() { 723 return information; 724 } 725 726 public void setInfo(String str) { 727 information = str; 728 } 729 730 public String source = ""; 731 732 public String getSource() { 733 return source; 734 } 735 736 public void setSource(String str) { 737 source = str; 738 } 739 662 740 // **********************!!!!!!!!! 663 741 public Light light = new Light(dlg);
Note:
See TracChangeset
for help on using the changeset viewer.