Changeset 26581 in osm
- Timestamp:
- 2011-08-27T21:05:19+02:00 (14 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/msg/messages.properties
r26579 r26581 118 118 Pink=Pink 119 119 120 UKPurpose=Unknown Purpose 121 Warning=Warning 122 Yachting=Yachting 123 Outfall=Outfall 124 ODAS=ODAS 125 RecreationZone=Recreation Zone 126 Mooring=Mooring 127 LANBY=LANBY 128 Leading=Leading 129 Notice=Notice 130 TSS=TSS 131 FoulGround=Foul Ground 132 FerryCross=Ferry Crossing 133 Anchorage=Anchorage 134 ChanSeparation=Channel Separation 135 120 136 UKCategory=Unknown Category 121 137 Traffic=Traffic Control -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLights.java
r26579 r26581 167 167 } 168 168 } 169 checkValidity(); 169 170 } 170 171 } -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSpec.java
r26579 r26581 17 17 public JLabel categoryLabel; 18 18 public JComboBox categoryBox; 19 public EnumMap<Cat, Integer> categories = new EnumMap<Cat, Integer>(Cat.class); 19 20 private ActionListener alCategoryBox = new ActionListener() { 20 21 public void actionPerformed(java.awt.event.ActionEvent e) { 22 for (Cat cat : categories.keySet()) { 23 int idx = categories.get(cat); 24 if (dlg.mark != null && (idx == categoryBox.getSelectedIndex())) 25 dlg.mark.setCategory(cat); 26 } 27 checkValidity(); 21 28 } 22 29 }; … … 51 58 button.setBorderPainted(false); 52 59 } 53 if (dlg.mark != null) { 54 if ((dlg.mark.getObject() != Obj.UNKNOWN) && (dlg.mark.getShape() != Shp.UNKNOWN)) 55 dlg.panelMain.moreButton.setVisible(true); 56 else 57 dlg.panelMain.moreButton.setVisible(false); 58 dlg.mark.paintSign(); 59 } 60 checkValidity(); 60 61 } 61 62 }; … … 88 89 this.add(categoryBox, null); 89 90 categoryBox.addActionListener(alCategoryBox); 90 categoryBox.addItem(Messages.getString("NoneSpecified")); 91 categoryBox.addItem(Messages.getString("General")); 92 categoryBox.addItem(Messages.getString("ChannelSeparation")); 93 categoryBox.addItem(Messages.getString("EntryProhibited")); 94 categoryBox.addItem(Messages.getString("Yachting")); 95 categoryBox.addItem(Messages.getString("Diving")); 96 categoryBox.addItem(Messages.getString("Anchorage")); 97 categoryBox.addItem(Messages.getString("Pipeline")); 98 categoryBox.addItem(Messages.getString("SpeedLimit")); 99 categoryBox.addItem(Messages.getString("FerryCrossing")); 100 categoryBox.addItem(Messages.getString("FoulGround")); 101 categoryBox.addItem(Messages.getString("UnknownPurpose")); 91 addCatItem(Messages.getString("UKPurpose"), Cat.SPM_UNKN); 92 addCatItem(Messages.getString("Warning"), Cat.SPM_WARN); 93 addCatItem(Messages.getString("ChanSeparation"), Cat.SPM_CHBF); 94 addCatItem(Messages.getString("Yachting"), Cat.SPM_YCHT); 95 addCatItem(Messages.getString("Cable"), Cat.SPM_CABL); 96 addCatItem(Messages.getString("Outfall"), Cat.SPM_OFAL); 97 addCatItem(Messages.getString("ODAS"), Cat.SPM_ODAS); 98 addCatItem(Messages.getString("RecreationZone"), Cat.SPM_RECN); 99 addCatItem(Messages.getString("Mooring"), Cat.SPM_MOOR); 100 addCatItem(Messages.getString("LANBY"), Cat.SPM_LNBY); 101 addCatItem(Messages.getString("Leading"), Cat.SPM_LDNG); 102 addCatItem(Messages.getString("Notice"), Cat.SPM_NOTC); 103 addCatItem(Messages.getString("TSS"), Cat.SPM_TSS); 104 addCatItem(Messages.getString("FoulGround"), Cat.SPM_FOUL); 105 addCatItem(Messages.getString("Diving"), Cat.SPM_DIVE); 106 addCatItem(Messages.getString("FerryCross"), Cat.SPM_FRRY); 107 addCatItem(Messages.getString("Anchorage"), Cat.SPM_ANCH); 102 108 } 103 109 110 private void checkValidity() { 111 if (dlg.mark != null) { 112 if ((dlg.mark.getObject() != Obj.UNKNOWN) && (dlg.mark.getShape() != Shp.UNKNOWN)) { 113 dlg.panelMain.fogButton.setEnabled(true); 114 dlg.panelMain.radButton.setEnabled(true); 115 dlg.panelMain.litButton.setEnabled(true); 116 dlg.panelMain.moreButton.setVisible(true); 117 } else { 118 dlg.panelMain.fogButton.setEnabled(false); 119 dlg.panelMain.radButton.setEnabled(false); 120 dlg.panelMain.litButton.setEnabled(false); 121 dlg.panelMain.moreButton.setVisible(false); 122 } 123 dlg.mark.paintSign(); 124 } 125 } 126 104 127 public void updateSelections() { 105 128 if (dlg.mark != null) { … … 118 141 } else 119 142 clearSelections(); 143 } 144 145 private void addCatItem(String str, Cat cat) { 146 categories.put(cat, categoryBox.getItemCount()); 147 categoryBox.addItem(str); 120 148 } 121 149 -
applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
r26579 r26581 143 143 CAM_NORTH, CAM_EAST, CAM_SOUTH, CAM_WEST, 144 144 ACH_URST, ACH_DEEP, ACH_TANK, ACH_EXPL, ACH_QUAR, ACH_SPLN, ACH_SCAN, ACH_SCMO, ACH_T24H, ACH_TLIM, 145 SPM_CHBF, SPM_YCHT, 145 SPM_UNKN, SPM_WARN, SPM_CHBF, SPM_YCHT, SPM_CABL, SPM_OFAL, SPM_ODAS, SPM_RECN, 146 SPM_MOOR, SPM_LNBY, SPM_LDNG, SPM_NOTC, SPM_TSS, SPM_FOUL, SPM_DIVE, SPM_FRRY, SPM_ANCH, 146 147 MOR_DLPN, MOR_DDPN, MOR_BLRD, MOR_WALL, MOR_POST, MOR_CHWR, MOR_BUOY, 147 148 SIS_PTCL, SIS_PTED, SIS_IPT, SIS_BRTH, SIS_DOCK, SIS_LOCK, SIS_FBAR, SIS_BRDG, SIS_DRDG, SIS_TRFC, … … 160 161 CatSTR.put(Cat.CAM_SOUTH, "south"); 161 162 CatSTR.put(Cat.CAM_WEST, "west"); 163 CatSTR.put(Cat.SPM_UNKN, "unknown"); 164 CatSTR.put(Cat.SPM_WARN, "warning"); 165 CatSTR.put(Cat.SPM_CHBF, "channel_separation"); 166 CatSTR.put(Cat.SPM_YCHT, "yachting"); 167 CatSTR.put(Cat.SPM_CABL, "cable"); 168 CatSTR.put(Cat.SPM_OFAL, "outfall"); 169 CatSTR.put(Cat.SPM_ODAS, "ODAS"); 170 CatSTR.put(Cat.SPM_RECN, "recreational"); 171 CatSTR.put(Cat.SPM_MOOR, "mooring"); 172 CatSTR.put(Cat.SPM_LNBY, "LANBY"); 173 CatSTR.put(Cat.SPM_LDNG, "leading"); 174 CatSTR.put(Cat.SPM_NOTC, "notice"); 175 CatSTR.put(Cat.SPM_TSS, "TSS"); 176 CatSTR.put(Cat.SPM_FOUL, "foul"); 177 CatSTR.put(Cat.SPM_DIVE, "diving"); 178 CatSTR.put(Cat.SPM_FRRY, "ferry"); 179 CatSTR.put(Cat.SPM_ANCH, "anchorage"); 162 180 CatSTR.put(Cat.MOR_DLPN, "dolphin"); 163 181 CatSTR.put(Cat.MOR_DDPN, "deviation_dolphon");
Note:
See TracChangeset
for help on using the changeset viewer.