Changeset 27389 in osm


Ignore:
Timestamp:
2012-01-02T13:52:17+01:00 (13 years ago)
Author:
malcolmh
Message:

save

Location:
applications/editors/josm/plugins/smed/plugs/oseam/src
Files:
5 added
6 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages.properties

    r27151 r27389  
    278278SpireMinaret=Spire/Minaret
    279279
     280Oil=Oil
     281Production=Production
     282Observation=Observation
     283ALP=ALP
     284SALM=SALM
     285MooringTower=Mooring Tower
     286ArtificialIsland=Artificial Island
     287FPSO=FPSO
     288Accommodation=Accommodation
     289NCCB=NCCB
     290
    280291NotDecimal=Not a valid decimal string
    281292TooBig=Maximum value exceeded
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_de.properties

    r27158 r27389  
    278278SpireMinaret=Spitzer Turm/Minarett
    279279
     280Oil=Oil
     281Production=Production
     282Observation=Observation
     283ALP=ALP
     284SALM=SALM
     285MooringTower=Mooring Tower
     286ArtificialIsland=Artificial Island
     287FPSO=FPSO
     288Accommodation=Accommodation
     289NCCB=NCCB
     290
    280291NotDecimal=Kein korrekter Dezimalwert
    281292TooBig=Maximaler Wert überschritten
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/msg/messages_en.properties

    r27151 r27389  
    278278SpireMinaret=Spire/Minaret
    279279
     280Oil=Oil
     281Production=Production
     282Observation=Observation
     283ALP=ALP
     284SALM=SALM
     285MooringTower=Mooring Tower
     286ArtificialIsland=Artificial Island
     287FPSO=FPSO
     288Accommodation=Accommodation
     289NCCB=NCCB
     290
    280291NotDecimal=Not a valid decimal string
    281292TooBig=Maximum value exceeded
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelLights.java

    r27314 r27389  
    5151                                int idx = warningCats.get(cat);
    5252                                if (dlg.node != null && (idx == warningCatBox.getSelectedIndex())) {
     53                                        dlg.panelMain.mark.setCategory(cat);
     54                                        dlg.panelMain.mark.testValid();
     55                                }
     56                        }
     57                }
     58        };
     59        public JComboBox platformCatBox;
     60        public EnumMap<Cat, Integer> platformCats = new EnumMap<Cat, Integer>(Cat.class);
     61        private ActionListener alPlatformCatBox = new ActionListener() {
     62                public void actionPerformed(java.awt.event.ActionEvent e) {
     63                        for (Cat cat : platformCats.keySet()) {
     64                                int idx = platformCats.get(cat);
     65                                if (dlg.node != null && (idx == platformCatBox.getSelectedIndex())) {
    5366                                        dlg.panelMain.mark.setCategory(cat);
    5467                                        dlg.panelMain.mark.testValid();
     
    6679        public JRadioButton trafficButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/TrafficButton.png")));
    6780        public JRadioButton warningButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/WarningButton.png")));
     81        public JRadioButton platformButton = new JRadioButton(new ImageIcon(getClass().getResource("/images/PlatformButton.png")));
    6882        public EnumMap<Obj, JRadioButton> objects = new EnumMap<Obj, JRadioButton>(Obj.class);
    6983        private ActionListener alObj = new ActionListener() {
     
    87101                                trafficCatBox.setVisible(false);
    88102                                warningCatBox.setVisible(false);
     103                                platformCatBox.setVisible(false);
    89104                                alLandCatBox.actionPerformed(null);
    90105                        } else if (trafficButton.isSelected()) {
     
    93108                                landCatBox.setVisible(false);
    94109                                warningCatBox.setVisible(false);
     110                                platformCatBox.setVisible(false);
    95111                                alTrafficCatBox.actionPerformed(null);
    96112                        } else if (warningButton.isSelected()) {
     
    99115                                landCatBox.setVisible(false);
    100116                                trafficCatBox.setVisible(false);
     117                                platformCatBox.setVisible(false);
    101118                                alWarningCatBox.actionPerformed(null);
     119                        } else if (platformButton.isSelected()) {
     120                                categoryLabel.setVisible(true);
     121                                platformCatBox.setVisible(true);
     122                                warningCatBox.setVisible(false);
     123                                landCatBox.setVisible(false);
     124                                trafficCatBox.setVisible(false);
     125                                alPlatformCatBox.actionPerformed(null);
    102126                        } else {
    103127                                dlg.panelMain.mark.setCategory(Cat.NOCAT);
     
    106130                                trafficCatBox.setVisible(false);
    107131                                warningCatBox.setVisible(false);
     132                                platformCatBox.setVisible(false);
    108133                        }
    109134                        dlg.panelMain.mark.testValid();
     
    115140                setLayout(null);
    116141                add(getObjButton(houseButton, 0, 0, 34, 32, "Lighthouse", Obj.LITHSE));
    117                 add(getObjButton(majorButton, 35, 0, 34, 32, "MajorLight", Obj.LITMAJ));
    118                 add(getObjButton(minorButton, 70, 0, 34, 32, "MinorLight", Obj.LITMIN));
    119                 add(getObjButton(landButton, 105, 0, 34, 32, "Landmark", Obj.LNDMRK));
     142                add(getObjButton(majorButton, 34, 0, 34, 32, "MajorLight", Obj.LITMAJ));
     143                add(getObjButton(minorButton, 68, 0, 34, 32, "MinorLight", Obj.LITMIN));
     144                add(getObjButton(landButton, 102, 0, 34, 32, "Landmark", Obj.LNDMRK));
     145                add(getObjButton(platformButton, 136, 0, 34, 32, "Platform", Obj.OFSPLF));
    120146                add(getObjButton(vesselButton, 0, 35, 34, 32, "LightVessel", Obj.LITVES));
    121                 add(getObjButton(floatButton, 35, 35, 34, 32, "LightFloat", Obj.LITFLT));
    122                 add(getObjButton(trafficButton, 70, 35, 34, 32, "SSTraffic", Obj.SISTAT));
    123                 add(getObjButton(warningButton, 105, 35, 34, 32, "SSWarning", Obj.SISTAW));
     147                add(getObjButton(floatButton, 34, 35, 34, 32, "LightFloat", Obj.LITFLT));
     148                add(getObjButton(trafficButton, 68, 35, 34, 32, "SSTraffic", Obj.SISTAT));
     149                add(getObjButton(warningButton, 102, 35, 34, 32, "SSWarning", Obj.SISTAW));
    124150
    125151                categoryLabel = new JLabel(Messages.getString("Category"), SwingConstants.CENTER);
     
    193219                warningCatBox.setVisible(false);
    194220
     221                platformCatBox = new JComboBox();
     222                platformCatBox.setBounds(new Rectangle(10, 100, 160, 20));
     223                add(platformCatBox);
     224                platformCatBox.addActionListener(alPlatformCatBox);
     225                addPLItem("", Cat.NOCAT);
     226                addPLItem(Messages.getString("Oil"), Cat.OFP_OIL);
     227                addPLItem(Messages.getString("Production"), Cat.OFP_PRD);
     228                addPLItem(Messages.getString("Observation"), Cat.OFP_OBS);
     229                addPLItem(Messages.getString("ALP"), Cat.OFP_ALP);
     230                addPLItem(Messages.getString("SALM"), Cat.OFP_SALM);
     231                addPLItem(Messages.getString("MooringTower"), Cat.OFP_MOR);
     232                addPLItem(Messages.getString("ArtificialIsland"), Cat.OFP_ISL);
     233                addPLItem(Messages.getString("FPSO"), Cat.OFP_FPSO);
     234                addPLItem(Messages.getString("Accommodation"), Cat.OFP_ACC);
     235                addPLItem(Messages.getString("NCCB"), Cat.OFP_NCCB);
     236                platformCatBox.setVisible(false);
    195237        }
    196238
     
    201243                        trafficCatBox.setVisible(false);
    202244                        warningCatBox.setVisible(false);
     245                        platformCatBox.setVisible(false);
    203246                        for (Cat cat : landCats.keySet()) {
    204247                                int item = landCats.get(cat);
     
    211254                                landCatBox.setVisible(false);
    212255                                warningCatBox.setVisible(false);
     256                                platformCatBox.setVisible(false);
    213257                                for (Cat cat : trafficCats.keySet()) {
    214258                                        int item = trafficCats.get(cat);
     
    221265                        landCatBox.setVisible(false);
    222266                        trafficCatBox.setVisible(false);
     267                        platformCatBox.setVisible(false);
    223268                        for (Cat cat : warningCats.keySet()) {
    224269                                int item = warningCats.get(cat);
    225270                                if (dlg.panelMain.mark.getCategory() == cat)
    226271                                        warningCatBox.setSelectedIndex(item);
     272                        }
     273                } else if (dlg.panelMain.mark.getObject() == Obj.OFSPLF) {
     274                        categoryLabel.setVisible(true);
     275                        platformCatBox.setVisible(true);
     276                        landCatBox.setVisible(false);
     277                        warningCatBox.setVisible(false);
     278                        trafficCatBox.setVisible(false);
     279                        for (Cat cat : platformCats.keySet()) {
     280                                int item = platformCats.get(cat);
     281                                if (dlg.panelMain.mark.getCategory() == cat)
     282                                        platformCatBox.setSelectedIndex(item);
    227283                        }
    228284                } else {
     
    231287                        trafficCatBox.setVisible(false);
    232288                        warningCatBox.setVisible(false);
     289                        platformCatBox.setVisible(false);
    233290                }
    234291                for (Obj obj : objects.keySet()) {
     
    252309                warningCats.put(cat, warningCatBox.getItemCount());
    253310                warningCatBox.addItem(str);
     311        }
     312
     313        private void addPLItem(String str, Cat cat) {
     314                platformCats.put(cat, platformCatBox.getItemCount());
     315                platformCatBox.addItem(str);
    254316        }
    255317
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMain.java

    r27317 r27389  
    310310                        case LGT:
    311311                        case SIS:
     312                        case PLF:
    312313                                lightsButton.setBorderPainted(true);
    313314                                topButton.setEnabled(false);
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java

    r27373 r27389  
    6565                FLTCAR, FLTISD, FLTLAT, FLTSAW, FLTSPP,
    6666                LITMAJ, LITMIN, LITFLT, LITVES, LITHSE, LNDMRK,
    67                 MORFAC, SISTAW, SISTAT
     67                MORFAC, SISTAW, SISTAT, OFSPLF
    6868        }
    6969
     
    9292                ObjSTR.put(Obj.LITHSE, "landmark");
    9393                ObjSTR.put(Obj.MORFAC, "mooring");
     94                ObjSTR.put(Obj.OFSPLF, "platform");
    9495                ObjSTR.put(Obj.SISTAW, "signal_station_warning");
    9596                ObjSTR.put(Obj.SISTAT, "signal_station_traffic");
     
    129130
    130131        public enum Ent {
    131                 BODY, BUOY, BEACON, LFLOAT, TOPMARK, LIGHT, MOORING, STATION
     132                BODY, BUOY, BEACON, LFLOAT, TOPMARK, LIGHT, MOORING, STATION, PLATFORM
    132133        }
    133134
     
    156157                EntMAP.put(Obj.LNDMRK, Ent.LIGHT);
    157158                EntMAP.put(Obj.MORFAC, Ent.MOORING);
     159                EntMAP.put(Obj.OFSPLF, Ent.PLATFORM);
    158160                EntMAP.put(Obj.SISTAW, Ent.STATION);
    159161                EntMAP.put(Obj.SISTAT, Ent.STATION);
     
    161163
    162164        public enum Grp {
    163                 NUL, LAT, CAR, SAW, ISD, SPP, LGT, SIS
     165                NUL, LAT, CAR, SAW, ISD, SPP, LGT, SIS, PLF
    164166        }
    165167
     
    189191                GrpMAP.put(Obj.LNDMRK, Grp.LGT);
    190192                GrpMAP.put(Obj.MORFAC, Grp.SPP);
     193                GrpMAP.put(Obj.OFSPLF, Grp.PLF);
    191194                GrpMAP.put(Obj.SISTAW, Grp.SIS);
    192195                GrpMAP.put(Obj.SISTAT, Grp.SIS);
     
    203206                SIS_TSTM, SIS_TGAG, SIS_TSCL, SIS_DIVE, SIS_LGAG, LIT_DIRF, LIT_LEDG,
    204207                LMK_CHMY, LMK_CARN, LMK_DSHA, LMK_FLGS, LMK_FLRS, LMK_MNMT, LMK_TOWR, LMK_WNDM, LMK_WTRT,
    205                 LMK_MAST, LMK_WNDS, LMK_CLMN, LMK_OBLK, LMK_STAT, LMK_CROS, LMK_DOME, LMK_SCNR, LMK_WNDL, LMK_SPIR
     208                LMK_MAST, LMK_WNDS, LMK_CLMN, LMK_OBLK, LMK_STAT, LMK_CROS, LMK_DOME, LMK_SCNR, LMK_WNDL, LMK_SPIR,
     209                OFP_OIL, OFP_PRD, OFP_OBS, OFP_ALP, OFP_SALM, OFP_MOR, OFP_ISL, OFP_FPSO, OFP_ACC, OFP_NCCB
    206210        }
    207211
     
    284288                CatSTR.put(Cat.LMK_WNDL, "windmill");
    285289                CatSTR.put(Cat.LMK_SPIR, "spire");
     290                CatSTR.put(Cat.OFP_OIL, "oil");
     291                CatSTR.put(Cat.OFP_PRD,  "production");
     292                CatSTR.put(Cat.OFP_OBS, "observation");
     293                CatSTR.put(Cat.OFP_ALP, "alp");
     294                CatSTR.put(Cat.OFP_SALM, "salm");
     295                CatSTR.put(Cat.OFP_MOR, "mooring");
     296                CatSTR.put(Cat.OFP_ISL, "island");
     297                CatSTR.put(Cat.OFP_FPSO, "fpso");
     298                CatSTR.put(Cat.OFP_ACC, "accommodation");
     299                CatSTR.put(Cat.OFP_NCCB, "nccb");
    286300        }
    287301
     
    11181132                case SISTAW:
    11191133                case SISTAT:
     1134                case OFSPLF:
    11201135                        tmp = true;
    11211136                        break;
     
    18751890                        case SISTAT:
    18761891                                imgStr += "Signal_Station";
     1892                                break;
     1893                        case OFSPLF:
     1894                                imgStr += "Platform";
    18771895                                break;
    18781896                        }
Note: See TracChangeset for help on using the changeset viewer.