Changeset 26903 in osm for applications/editors


Ignore:
Timestamp:
2011-10-18T19:57:18+02:00 (13 years ago)
Author:
malcolmh
Message:

save

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

    r26881 r26903  
    175175Source=Source
    176176Elevation=Elevation
    177 StructureHeight=Structure Height
     177Visibility=Visibility
     178Reflectivity=Reflectivity
     179Construction=Construction
    178180
     181NotSet=Not set
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java

    r26881 r26903  
    129129
    130130                        stack = new JPanel();
    131                         stack.setBorder(BorderFactory.createLoweredBevelBorder());
     131                        stack.setBorder(BorderFactory.createLineBorder(Color.black, 2));
    132132                        stack.setBounds(38, 87, 34, 64);
    133133                        stack.setLayout(null);
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelMore.java

    r26881 r26903  
    5151        public JLabel statusLabel;
    5252        public JComboBox statusBox;
     53        public EnumMap<Sts, Integer> statuses = new EnumMap<Sts, Integer>(Sts.class);
    5354        private ActionListener alStatus = new ActionListener() {
    5455                public void actionPerformed(java.awt.event.ActionEvent e) {
    55                         if (dlg.mark == null)
    56                                 return;
     56                        for (Sts sts : statuses.keySet()) {
     57                                int idx = statuses.get(sts);
     58                                if (dlg.mark != null && (idx == statusBox.getSelectedIndex()))
     59                                        dlg.mark.setStatus(sts);
     60                        }
    5761                }
    5862        };
     
    194198                elevBox.addActionListener(alElev);
    195199
    196                 heightLabel = new JLabel(Messages.getString("StructureHeight"), SwingConstants.CENTER);
    197                 heightLabel.setBounds(new Rectangle(230, 0, 100, 20));
     200                heightLabel = new JLabel(Messages.getString("Height"), SwingConstants.CENTER);
     201                heightLabel.setBounds(new Rectangle(140, 40, 90, 20));
    198202                this.add(heightLabel, null);
    199203                heightBox = new JTextField();
    200                 heightBox.setBounds(new Rectangle(250, 20, 50, 20));
     204                heightBox.setBounds(new Rectangle(160, 60, 50, 20));
    201205                this.add(heightBox, null);
    202206                heightBox.addActionListener(alHeight);
    203207
    204208                sourceLabel = new JLabel(Messages.getString("Source"), SwingConstants.CENTER);
    205                 sourceLabel.setBounds(new Rectangle(110, 120, 140, 20));
     209                sourceLabel.setBounds(new Rectangle(110, 80, 130, 20));
    206210                this.add(sourceLabel, null);
    207211                sourceBox = new JTextField();
    208                 sourceBox.setBounds(new Rectangle(110, 100, 140, 20));
     212                sourceBox.setBounds(new Rectangle(110, 100, 130, 20));
    209213                this.add(sourceBox, null);
    210214                sourceBox.addActionListener(alSource);
    211215
    212216                infoLabel = new JLabel(Messages.getString("Information"), SwingConstants.CENTER);
    213                 infoLabel.setBounds(new Rectangle(110, 120, 140, 20));
     217                infoLabel.setBounds(new Rectangle(110, 120, 130, 20));
    214218                this.add(infoLabel, null);
    215219                infoBox = new JTextField();
    216                 infoBox.setBounds(new Rectangle(110, 140, 140, 20));
     220                infoBox.setBounds(new Rectangle(110, 140, 130, 20));
    217221                this.add(infoBox, null);
    218222                infoBox.addActionListener(alInfo);
    219223
    220 /*              statusLabel = new JLabel(Messages.getString("Status"), SwingConstants.CENTER);
    221                 statusLabel.setBounds(new Rectangle(150, 0, 100, 20));
     224                statusLabel = new JLabel(Messages.getString("Status"), SwingConstants.CENTER);
     225                statusLabel.setBounds(new Rectangle(250, 0, 100, 20));
    222226                this.add(statusLabel, null);
    223227                statusBox = new JComboBox();
    224                 statusBox.setBounds(new Rectangle(150, 20, 100, 20));
     228                statusBox.setBounds(new Rectangle(250, 20, 100, 20));
     229                addStsItem(Messages.getString("NotSet"), Sts.UNKNOWN);
    225230                this.add(statusBox, null);
    226231                statusBox.addActionListener(alStatus);
    227 */
     232
     233                constrLabel = new JLabel(Messages.getString("Construction"), SwingConstants.CENTER);
     234                constrLabel.setBounds(new Rectangle(250, 40, 100, 20));
     235                this.add(constrLabel, null);
     236                constrBox = new JComboBox();
     237                constrBox.setBounds(new Rectangle(250, 60, 100, 20));
     238                this.add(constrBox, null);
     239                constrBox.addActionListener(alConstr);
     240
     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                visLabel = new JLabel(Messages.getString("Visibility"), SwingConstants.CENTER);
     250                visLabel.setBounds(new Rectangle(250, 120, 100, 20));
     251                this.add(visLabel, null);
     252                visBox = new JComboBox();
     253                visBox.setBounds(new Rectangle(250, 140, 100, 20));
     254                this.add(visBox, null);
     255                visBox.addActionListener(alVis);
     256
    228257                }
    229258
    230259        public void clearSelections() {
    231260                panelPat.clearSelections();
     261        }
     262
     263        private void addStsItem(String str, Sts sts) {
     264                statuses.put(sts, statusBox.getItemCount());
     265                statusBox.addItem(str);
    232266        }
    233267
  • applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java

    r26881 r26903  
    188188                CatSTR.put(Cat.SIS_PTCL, "control");
    189189                CatSTR.put(Cat.SIS_PTED, "entry");
    190                 CatSTR.put(Cat.SIS_IPT, "ipt");
     190                CatSTR.put(Cat.SIS_IPT, "IPT");
    191191                CatSTR.put(Cat.SIS_BRTH, "berthing");
    192192                CatSTR.put(Cat.SIS_DOCK, "dock");
     
    624624        }
    625625
     626        public enum Sts {
     627                UNKNOWN, PERM, OCC, REC, NIU, INT, RESV, TEMP, PRIV, MAND, DEST, EXT, ILLUM, HIST, PUB, SYNC, WATCH, UNWAT, DOUBT
     628        }
     629       
     630        public static final EnumMap<Sts, String> StsSTR = new EnumMap<Sts, String>(Sts.class);
     631        static {
     632                StsSTR.put(Sts.PERM, "permanent");
     633                StsSTR.put(Sts.OCC, "occasional");
     634                StsSTR.put(Sts.REC, "recommended");
     635                StsSTR.put(Sts.NIU, "not_in_use");
     636                StsSTR.put(Sts.INT, "intermittent");
     637                StsSTR.put(Sts.RESV, "reserved");
     638                StsSTR.put(Sts.TEMP, "tempory");
     639                StsSTR.put(Sts.PRIV, "private");
     640                StsSTR.put(Sts.MAND, "mandatory");
     641                StsSTR.put(Sts.DEST, "destroyed");
     642                StsSTR.put(Sts.EXT, "extinguished");
     643                StsSTR.put(Sts.ILLUM, "illuminated");
     644                StsSTR.put(Sts.HIST, "historic");
     645                StsSTR.put(Sts.PUB, "public");
     646                StsSTR.put(Sts.SYNC, "synchronized");
     647                StsSTR.put(Sts.WATCH, "watched");
     648                StsSTR.put(Sts.UNWAT, "unwatched");
     649                StsSTR.put(Sts.DOUBT, "existence_doubtful");
     650        }
     651
     652        private Sts status = Sts.UNKNOWN;
     653       
     654        public Sts getStatus() {
     655                return status;
     656        }
     657
     658        public void setStatus(Sts sts) {
     659                status = sts;
     660        }
     661
     662        // **********************!!!!!!!!!
    626663        public Light light = new Light(dlg);
    627664
Note: See TracChangeset for help on using the changeset viewer.