Ignore:
Timestamp:
2014-10-19T01:27:04+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plugins] fix java 7 warnings / global usage of try-with-resource

Location:
applications/editors/josm/plugins/smed/src
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/smed/src/panels/PanelChan.java

    r29894 r30738  
    2828                        panelStbd.setVisible(false);
    2929                        panelSaw.setVisible(false);
    30                         dlg.panelMain.moreButton.setVisible(false);
    31                         dlg.panelMain.saveButton.setEnabled(false);
     30                        SmedAction.panelMain.moreButton.setVisible(false);
     31                        SmedAction.panelMain.saveButton.setEnabled(false);
    3232                        topmarkButton.setVisible(false);
    3333                        lightButton.setVisible(false);
    34                         Shp shp = dlg.panelMain.mark.getShape();
     34                        Shp shp = SmedAction.panelMain.mark.getShape();
    3535                        if (portButton.isSelected()) {
    36                                 dlg.panelMain.mark.setCategory(Cat.LAM_PORT);
     36                                SmedAction.panelMain.mark.setCategory(Cat.LAM_PORT);
    3737                                if (panelPort.shapes.containsKey(shp)) {
    3838                                        panelPort.shapes.get(shp).setSelected(true);
    3939                                } else {
    4040                                        panelPort.shapeButtons.clearSelection();
    41                                         dlg.panelMain.mark.setShape(Shp.UNKSHP);
     41                                        SmedAction.panelMain.mark.setShape(Shp.UNKSHP);
    4242                                }
    4343                                panelPort.alShape.actionPerformed(null);
     
    4848                        }
    4949                        if (stbdButton.isSelected()) {
    50                                 dlg.panelMain.mark.setCategory(Cat.LAM_STBD);
     50                                SmedAction.panelMain.mark.setCategory(Cat.LAM_STBD);
    5151                                if (panelStbd.shapes.containsKey(shp)) {
    5252                                        panelStbd.shapes.get(shp).setSelected(true);
    5353                                } else {
    5454                                        panelStbd.shapeButtons.clearSelection();
    55                                         dlg.panelMain.mark.setShape(Shp.UNKSHP);
     55                                        SmedAction.panelMain.mark.setShape(Shp.UNKSHP);
    5656                                }
    5757                                panelStbd.alShape.actionPerformed(null);
     
    6262                        }
    6363                        if (prefStbdButton.isSelected()) {
    64                                 dlg.panelMain.mark.setCategory(Cat.LAM_PSTBD);
     64                                SmedAction.panelMain.mark.setCategory(Cat.LAM_PSTBD);
    6565                                if (panelPort.shapes.containsKey(shp)) {
    6666                                        panelPort.shapes.get(shp).setSelected(true);
    6767                                } else {
    6868                                        panelPort.shapeButtons.clearSelection();
    69                                         dlg.panelMain.mark.setShape(Shp.UNKSHP);
     69                                        SmedAction.panelMain.mark.setShape(Shp.UNKSHP);
    7070                                }
    7171                                panelPort.alShape.actionPerformed(null);
     
    7676                        }
    7777                        if (prefPortButton.isSelected()) {
    78                                 dlg.panelMain.mark.setCategory(Cat.LAM_PPORT);
     78                                SmedAction.panelMain.mark.setCategory(Cat.LAM_PPORT);
    7979                                if (panelStbd.shapes.containsKey(shp)) {
    8080                                        panelStbd.shapes.get(shp).setSelected(true);
    8181                                } else {
    8282                                        panelStbd.shapeButtons.clearSelection();
    83                                         dlg.panelMain.mark.setShape(Shp.UNKSHP);
     83                                        SmedAction.panelMain.mark.setShape(Shp.UNKSHP);
    8484                                }
    8585                                panelStbd.alShape.actionPerformed(null);
     
    9090                        }
    9191                        if (safeWaterButton.isSelected()) {
    92                                 dlg.panelMain.mark.setCategory(Cat.NOCAT);
     92                                SmedAction.panelMain.mark.setCategory(Cat.NOCAT);
    9393                                panelSaw.setVisible(true);
    9494                                if (panelSaw.shapes.containsKey(shp)) {
     
    9696                                } else {
    9797                                        panelSaw.shapeButtons.clearSelection();
    98                                         dlg.panelMain.mark.setShape(Shp.UNKSHP);
     98                                        SmedAction.panelMain.mark.setShape(Shp.UNKSHP);
    9999                                }
    100100                                panelSaw.alShape.actionPerformed(null);
     
    104104                                safeWaterButton.setBorderPainted(false);
    105105                        }
    106                         topmarkButton.setVisible(dlg.panelMain.mark.testValid());
    107                         lightButton.setVisible(dlg.panelMain.mark.testValid());
    108                         dlg.panelMain.panelMore.syncPanel();
     106                        topmarkButton.setVisible(SmedAction.panelMain.mark.testValid());
     107                        lightButton.setVisible(SmedAction.panelMain.mark.testValid());
     108                        SmedAction.panelMain.panelMore.syncPanel();
    109109                }
    110110        };
     
    113113                public void actionPerformed(java.awt.event.ActionEvent e) {
    114114                        if (topmarkButton.isSelected()) {
    115                                 if (SeaMark.GrpMAP.get(dlg.panelMain.mark.getObject()) == Grp.SAW) {
    116                                         dlg.panelMain.mark.setTopmark(Top.SPHERE);
    117                                         dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
    118                                         dlg.panelMain.mark.setTopColour(Col.RED);
     115                                if (SeaMark.GrpMAP.get(SmedAction.panelMain.mark.getObject()) == Grp.SAW) {
     116                                        SmedAction.panelMain.mark.setTopmark(Top.SPHERE);
     117                                        SmedAction.panelMain.mark.setTopPattern(Pat.NOPAT);
     118                                        SmedAction.panelMain.mark.setTopColour(Col.RED);
    119119                                } else {
    120120                                        switch (dlg.panelMain.mark.getCategory()) {
  • applications/editors/josm/plugins/smed/src/panels/PanelChr.java

    r30737 r30738  
    6767                        }
    6868                        String str = charBox.getText();
    69                         dlg.panelMain.mark.setLightAtt(Att.CHR, 0, str);
     69                        SmedAction.panelMain.mark.setLightAtt(Att.CHR, 0, str);
    7070                        if (!str.contains("Al")) {
    71                                 col2Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.COL, 0)));
    72                                 dlg.panelMain.mark.setLightAtt(Att.ALT, 0, Col.UNKCOL);
     71                                col2Label.setBackground(SeaMark.ColMAP.get(SmedAction.panelMain.mark.getLightAtt(Att.COL, 0)));
     72                                SmedAction.panelMain.mark.setLightAtt(Att.ALT, 0, Col.UNKCOL);
    7373                        } else {
    74                                 col2Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.ALT, 0)));
     74                                col2Label.setBackground(SeaMark.ColMAP.get(SmedAction.panelMain.mark.getLightAtt(Att.ALT, 0)));
    7575                        }
    7676                }
     
    8080                        public void focusLost(java.awt.event.FocusEvent e) {
    8181                        String str = charBox.getText();
    82                         dlg.panelMain.mark.setLightAtt(Att.CHR, 0, str);
     82                        SmedAction.panelMain.mark.setLightAtt(Att.CHR, 0, str);
    8383                        EnumSet<Chr> set = EnumSet.noneOf(Chr.class);
    8484                        for (EnumSet<Chr> map : SeaMark.ChrMAP.keySet()) {
     
    9999                        }
    100100                        if (!str.contains("Al")) {
    101                                 col2Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.COL, 0)));
    102                                 dlg.panelMain.mark.setLightAtt(Att.ALT, 0, Col.UNKCOL);
     101                                col2Label.setBackground(SeaMark.ColMAP.get(SmedAction.panelMain.mark.getLightAtt(Att.COL, 0)));
     102                                SmedAction.panelMain.mark.setLightAtt(Att.ALT, 0, Col.UNKCOL);
    103103                        } else {
    104                                 col2Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.ALT, 0)));
     104                                col2Label.setBackground(SeaMark.ColMAP.get(SmedAction.panelMain.mark.getLightAtt(Att.ALT, 0)));
    105105                        }
    106106                }
     
    141141
    142142        public void syncPanel() {
    143                 String str = (String)dlg.panelMain.mark.getLightAtt(Att.CHR, 0);
     143                String str = (String)SmedAction.panelMain.mark.getLightAtt(Att.CHR, 0);
    144144                charBox.setText(str);
    145145                EnumSet<Chr> set = EnumSet.noneOf(Chr.class);
     
    151151                }
    152152                if (!str.contains("Al")) {
    153                         col2Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.COL, 0)));
     153                        col2Label.setBackground(SeaMark.ColMAP.get(SmedAction.panelMain.mark.getLightAtt(Att.COL, 0)));
    154154                } else {
    155                         col2Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.ALT, 0)));
     155                        col2Label.setBackground(SeaMark.ColMAP.get(SmedAction.panelMain.mark.getLightAtt(Att.ALT, 0)));
    156156                }
    157                 col1Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.COL, 0)));
     157                col1Label.setBackground(SeaMark.ColMAP.get(SmedAction.panelMain.mark.getLightAtt(Att.COL, 0)));
    158158                for (Chr chr : buttons.keySet()) {
    159159                        JToggleButton button = buttons.get(chr);
  • applications/editors/josm/plugins/smed/src/panels/PanelCol.java

    r30737 r30738  
    4141                                if (button.isSelected()) {
    4242                                        if (ent == Ent.LIGHT) {
    43                                                 if (((String) dlg.panelMain.mark.getLightAtt(Att.CHR, 0)).contains("Al")) {
    44                                                         if (((button == delButton) && (dlg.panelMain.mark.getLightAtt(Att.ALT, 0) == Col.UNKCOL))
    45                                                                         || (dlg.panelMain.mark.getLightAtt(Att.COL, 0) == Col.UNKCOL)) {
    46                                                                 dlg.panelMain.mark.setLightAtt(Att.COL, 0, col);
    47                                                                 dlg.panelMain.panelLit.panelChr.col1Label.setBackground(SeaMark.ColMAP.get(col));
     43                                                if (((String) SmedAction.panelMain.mark.getLightAtt(Att.CHR, 0)).contains("Al")) {
     44                                                        if (((button == delButton) && (SmedAction.panelMain.mark.getLightAtt(Att.ALT, 0) == Col.UNKCOL))
     45                                                                        || (SmedAction.panelMain.mark.getLightAtt(Att.COL, 0) == Col.UNKCOL)) {
     46                                                                SmedAction.panelMain.mark.setLightAtt(Att.COL, 0, col);
     47                                                                SmedAction.panelMain.panelLit.panelChr.col1Label.setBackground(SeaMark.ColMAP.get(col));
    4848                                                        } else {
    49                                                                 dlg.panelMain.mark.setLightAtt(Att.ALT, 0, col);
    50                                                                 dlg.panelMain.panelLit.panelChr.col2Label.setBackground(SeaMark.ColMAP.get(col));
     49                                                                SmedAction.panelMain.mark.setLightAtt(Att.ALT, 0, col);
     50                                                                SmedAction.panelMain.panelLit.panelChr.col2Label.setBackground(SeaMark.ColMAP.get(col));
    5151                                                        }
    5252                                                } else {
    53                                                         dlg.panelMain.mark.setLightAtt(Att.COL, 0, col);
    54                                                         dlg.panelMain.panelLit.panelChr.col1Label.setBackground(SeaMark.ColMAP.get(col));
    55                                                         dlg.panelMain.panelLit.panelChr.col2Label.setBackground(SeaMark.ColMAP.get(col));
     53                                                        SmedAction.panelMain.mark.setLightAtt(Att.COL, 0, col);
     54                                                        SmedAction.panelMain.panelLit.panelChr.col1Label.setBackground(SeaMark.ColMAP.get(col));
     55                                                        SmedAction.panelMain.panelLit.panelChr.col2Label.setBackground(SeaMark.ColMAP.get(col));
    5656                                                }
    5757                                                button.setBorderPainted(true);
    5858                                        } else {
    5959                                                if (button == delButton) {
    60                                                         dlg.panelMain.mark.subColour(ent, stackIdx);
     60                                                        SmedAction.panelMain.mark.subColour(ent, stackIdx);
    6161                                                } else if (button == addButton) {
    6262                                                        if (stackCol.size() != 0)
    6363                                                                stackIdx++;
    6464                                                        if (stackCol.size() == 0)
    65                                                                 dlg.panelMain.mark.setColour(ent, col);
     65                                                                SmedAction.panelMain.mark.setColour(ent, col);
    6666                                                        else
    67                                                                 switch (dlg.panelMain.mark.getPattern(ent)) {
     67                                                                switch (SmedAction.panelMain.mark.getPattern(ent)) {
    6868                                                                case NOPAT:
    6969                                                                        break;
     
    7171                                                                case CROSS:
    7272                                                                        if (stackCol.size() < 2)
    73                                                                                 dlg.panelMain.mark.addColour(ent, stackIdx, col);
     73                                                                                SmedAction.panelMain.mark.addColour(ent, stackIdx, col);
    7474                                                                        break;
    7575                                                                case SQUARED:
    7676                                                                        if (stackCol.size() < 4)
    77                                                                                 dlg.panelMain.mark.addColour(ent, stackIdx, col);
     77                                                                                SmedAction.panelMain.mark.addColour(ent, stackIdx, col);
    7878                                                                        break;
    7979                                                                default:
    80                                                                         dlg.panelMain.mark.addColour(ent, stackIdx, col);
     80                                                                        SmedAction.panelMain.mark.addColour(ent, stackIdx, col);
    8181                                                                        break;
    8282                                                                }
    8383                                                } else {
    84                                                         dlg.panelMain.mark.setColour(ent, stackIdx, col);
     84                                                        SmedAction.panelMain.mark.setColour(ent, stackIdx, col);
    8585                                                }
    8686                                                syncPanel();
     
    150150                        for (Col col : colours.keySet()) {
    151151                                JRadioButton button = colours.get(col);
    152                                 if (dlg.panelMain.mark.getLightAtt(Att.COL, 0) == col) {
     152                                if (SmedAction.panelMain.mark.getLightAtt(Att.COL, 0) == col) {
    153153                                        button.setBorderPainted(true);
    154154                                } else
     
    157157                } else {
    158158                        int idx;
    159                         for (idx = 0; dlg.panelMain.mark.getColour(ent, idx) != Col.UNKCOL; idx++) {
     159                        for (idx = 0; SmedAction.panelMain.mark.getColour(ent, idx) != Col.UNKCOL; idx++) {
    160160                                if (stackCol.size() <= idx) {
    161161                                        stackCol.add(idx, new JRadioButton(new ImageIcon(getClass().getResource("/images/ColourButton.png"))));
     
    185185                                        JRadioButton btnI = stackCol.get(idx);
    186186                                        btnI.setBounds(2, (2 + (idx * height)), 30, height);
    187                                         btnI.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getColour(ent, idx)));
     187                                        btnI.setBackground(SeaMark.ColMAP.get(SmedAction.panelMain.mark.getColour(ent, idx)));
    188188                                        if (stackIdx == idx) {
    189189                                                btnI.setBorderPainted(true);
  • applications/editors/josm/plugins/smed/src/panels/PanelFog.java

    r30737 r30738  
    3030                                JRadioButton button = fogs.get(fog);
    3131                                if (button.isSelected()) {
    32                                         dlg.panelMain.mark.setFogSound(fog);
     32                                        SmedAction.panelMain.mark.setFogSound(fog);
    3333                                        button.setBorderPainted(true);
    3434                                } else
     
    4141        private FocusListener flGroup = new FocusAdapter() {
    4242                public void focusLost(java.awt.event.FocusEvent e) {
    43                         dlg.panelMain.mark.setFogGroup(groupBox.getText());
     43                        SmedAction.panelMain.mark.setFogGroup(groupBox.getText());
    4444                }
    4545        };
     
    4848        private FocusListener flPeriod = new FocusAdapter() {
    4949                public void focusLost(java.awt.event.FocusEvent e) {
    50                         dlg.panelMain.mark.setFogPeriod(periodBox.getText());
     50                        SmedAction.panelMain.mark.setFogPeriod(periodBox.getText());
    5151                }
    5252        };
     
    5555        private FocusListener flSeq = new FocusAdapter() {
    5656                public void focusLost(java.awt.event.FocusEvent e) {
    57                         dlg.panelMain.mark.setFogSequence(seqBox.getText());
     57                        SmedAction.panelMain.mark.setFogSequence(seqBox.getText());
    5858                }
    5959        };
     
    6262        private FocusListener flRange = new FocusAdapter() {
    6363                public void focusLost(java.awt.event.FocusEvent e) {
    64                         dlg.panelMain.mark.setFogRange(rangeBox.getText());
     64                        SmedAction.panelMain.mark.setFogRange(rangeBox.getText());
    6565                }
    6666        };
     
    120120                for (Fog fog : fogs.keySet()) {
    121121                        JRadioButton button = fogs.get(fog);
    122                         button.setBorderPainted(dlg.panelMain.mark.getFogSound() == fog);
     122                        button.setBorderPainted(SmedAction.panelMain.mark.getFogSound() == fog);
    123123                }
    124                 groupBox.setText(dlg.panelMain.mark.getFogGroup());
    125                 seqBox.setText(dlg.panelMain.mark.getFogSequence());
    126                 periodBox.setText(dlg.panelMain.mark.getFogPeriod());
    127                 rangeBox.setText(dlg.panelMain.mark.getFogRange());
     124                groupBox.setText(SmedAction.panelMain.mark.getFogGroup());
     125                seqBox.setText(SmedAction.panelMain.mark.getFogSequence());
     126                periodBox.setText(SmedAction.panelMain.mark.getFogPeriod());
     127                rangeBox.setText(SmedAction.panelMain.mark.getFogRange());
    128128        }
    129129
  • applications/editors/josm/plugins/smed/src/panels/PanelHaz.java

    r30737 r30738  
    2424        private ActionListener alCat = new ActionListener() {
    2525                public void actionPerformed(java.awt.event.ActionEvent e) {
    26                         dlg.panelMain.mark.setObjPattern(Pat.HSTRP);
     26                        SmedAction.panelMain.mark.setObjPattern(Pat.HSTRP);
    2727                        if (northButton.isSelected()) {
    28                                 dlg.panelMain.mark.setCategory(Cat.CAM_NORTH);
    29                                 dlg.panelMain.mark.setObjColour(Col.BLACK);
    30                                 dlg.panelMain.mark.addObjColour(Col.YELLOW);
     28                                SmedAction.panelMain.mark.setCategory(Cat.CAM_NORTH);
     29                                SmedAction.panelMain.mark.setObjColour(Col.BLACK);
     30                                SmedAction.panelMain.mark.addObjColour(Col.YELLOW);
    3131                                northButton.setBorderPainted(true);
    3232                        } else {
     
    3434                        }
    3535                        if (southButton.isSelected()) {
    36                                 dlg.panelMain.mark.setCategory(Cat.CAM_SOUTH);
    37                                 dlg.panelMain.mark.setObjColour(Col.YELLOW);
    38                                 dlg.panelMain.mark.addObjColour(Col.BLACK);
     36                                SmedAction.panelMain.mark.setCategory(Cat.CAM_SOUTH);
     37                                SmedAction.panelMain.mark.setObjColour(Col.YELLOW);
     38                                SmedAction.panelMain.mark.addObjColour(Col.BLACK);
    3939                                southButton.setBorderPainted(true);
    4040                        } else {
     
    4242                        }
    4343                        if (eastButton.isSelected()) {
    44                                 dlg.panelMain.mark.setCategory(Cat.CAM_EAST);
    45                                 dlg.panelMain.mark.setObjColour(Col.BLACK);
    46                                 dlg.panelMain.mark.addObjColour(Col.YELLOW);
    47                                 dlg.panelMain.mark.addObjColour(Col.BLACK);
     44                                SmedAction.panelMain.mark.setCategory(Cat.CAM_EAST);
     45                                SmedAction.panelMain.mark.setObjColour(Col.BLACK);
     46                                SmedAction.panelMain.mark.addObjColour(Col.YELLOW);
     47                                SmedAction.panelMain.mark.addObjColour(Col.BLACK);
    4848                                eastButton.setBorderPainted(true);
    4949                        } else {
     
    5151                        }
    5252                        if (westButton.isSelected()) {
    53                                 dlg.panelMain.mark.setCategory(Cat.CAM_WEST);
    54                                 dlg.panelMain.mark.setObjColour(Col.YELLOW);
    55                                 dlg.panelMain.mark.addObjColour(Col.BLACK);
    56                                 dlg.panelMain.mark.addObjColour(Col.YELLOW);
     53                                SmedAction.panelMain.mark.setCategory(Cat.CAM_WEST);
     54                                SmedAction.panelMain.mark.setObjColour(Col.YELLOW);
     55                                SmedAction.panelMain.mark.addObjColour(Col.BLACK);
     56                                SmedAction.panelMain.mark.addObjColour(Col.YELLOW);
    5757                                westButton.setBorderPainted(true);
    5858                        } else {
     
    6060                        }
    6161                        if (isolButton.isSelected()) {
    62                                 dlg.panelMain.mark.setCategory(Cat.NOCAT);
    63                                 dlg.panelMain.mark.setObjColour(Col.BLACK);
    64                                 dlg.panelMain.mark.addObjColour(Col.RED);
    65                                 dlg.panelMain.mark.addObjColour(Col.BLACK);
     62                                SmedAction.panelMain.mark.setCategory(Cat.NOCAT);
     63                                SmedAction.panelMain.mark.setObjColour(Col.BLACK);
     64                                SmedAction.panelMain.mark.addObjColour(Col.RED);
     65                                SmedAction.panelMain.mark.addObjColour(Col.BLACK);
    6666                                isolButton.setBorderPainted(true);
    6767                        } else {
    6868                                isolButton.setBorderPainted(false);
    6969                        }
    70                         topmarkButton.setVisible(dlg.panelMain.mark.testValid());
    71                         lightButton.setVisible(dlg.panelMain.mark.testValid());
    72                         dlg.panelMain.panelMore.syncPanel();
     70                        topmarkButton.setVisible(SmedAction.panelMain.mark.testValid());
     71                        lightButton.setVisible(SmedAction.panelMain.mark.testValid());
     72                        SmedAction.panelMain.panelMore.syncPanel();
    7373                }
    7474        };
     
    9090                                JRadioButton button = shapes.get(shp);
    9191                                if (button.isSelected()) {
    92                                         dlg.panelMain.mark.setShape(shp);
     92                                        SmedAction.panelMain.mark.setShape(shp);
    9393                                        if (isolButton.isSelected())
    94                                                 dlg.panelMain.mark.setObject(isdObjects.get(shp));
     94                                                SmedAction.panelMain.mark.setObject(isdObjects.get(shp));
    9595                                        else
    96                                                 dlg.panelMain.mark.setObject(carObjects.get(shp));
     96                                                SmedAction.panelMain.mark.setObject(carObjects.get(shp));
    9797                                        button.setBorderPainted(true);
    9898                                } else
    9999                                        button.setBorderPainted(false);
    100100                        }
    101                         topmarkButton.setVisible(dlg.panelMain.mark.testValid());
    102                         lightButton.setVisible(dlg.panelMain.mark.testValid());
     101                        topmarkButton.setVisible(SmedAction.panelMain.mark.testValid());
     102                        lightButton.setVisible(SmedAction.panelMain.mark.testValid());
    103103                }
    104104        };
     
    107107                public void actionPerformed(java.awt.event.ActionEvent e) {
    108108                        if (topmarkButton.isSelected()) {
    109                                 dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
    110                                 dlg.panelMain.mark.setTopColour(Col.BLACK);
    111                                 switch (dlg.panelMain.mark.getCategory()) {
     109                                SmedAction.panelMain.mark.setTopPattern(Pat.NOPAT);
     110                                SmedAction.panelMain.mark.setTopColour(Col.BLACK);
     111                                switch (SmedAction.panelMain.mark.getCategory()) {
    112112                                case CAM_NORTH:
    113                                         dlg.panelMain.mark.setTopmark(Top.NORTH);
     113                                        SmedAction.panelMain.mark.setTopmark(Top.NORTH);
    114114                                        break;
    115115                                case CAM_SOUTH:
    116                                         dlg.panelMain.mark.setTopmark(Top.SOUTH);
     116                                        SmedAction.panelMain.mark.setTopmark(Top.SOUTH);
    117117                                        break;
    118118                                case CAM_EAST:
    119                                         dlg.panelMain.mark.setTopmark(Top.EAST);
     119                                        SmedAction.panelMain.mark.setTopmark(Top.EAST);
    120120                                        break;
    121121                                case CAM_WEST:
    122                                         dlg.panelMain.mark.setTopmark(Top.WEST);
     122                                        SmedAction.panelMain.mark.setTopmark(Top.WEST);
    123123                                        break;
    124124                                default:
    125                                         dlg.panelMain.mark.setTopmark(Top.SPHERES2);
     125                                        SmedAction.panelMain.mark.setTopmark(Top.SPHERES2);
    126126                                        break;
    127127                                }
    128128                                topmarkButton.setBorderPainted(true);
    129129                        } else {
    130                                 dlg.panelMain.mark.setTopmark(Top.NOTOP);
    131                                 dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
    132                                 dlg.panelMain.mark.setTopColour(Col.UNKCOL);
     130                                SmedAction.panelMain.mark.setTopmark(Top.NOTOP);
     131                                SmedAction.panelMain.mark.setTopPattern(Pat.NOPAT);
     132                                SmedAction.panelMain.mark.setTopColour(Col.UNKCOL);
    133133                                topmarkButton.setBorderPainted(false);
    134134                        }
    135                         dlg.panelMain.panelTop.syncPanel();
     135                        SmedAction.panelMain.panelTop.syncPanel();
    136136                }
    137137        };
     
    140140                public void actionPerformed(java.awt.event.ActionEvent e) {
    141141                        if (lightButton.isSelected()) {
    142                                 dlg.panelMain.mark.setLightAtt(Att.COL, 0, Col.WHITE);
    143                                 switch (dlg.panelMain.mark.getCategory()) {
     142                                SmedAction.panelMain.mark.setLightAtt(Att.COL, 0, Col.WHITE);
     143                                switch (SmedAction.panelMain.mark.getCategory()) {
    144144                                case CAM_NORTH:
    145                                         dlg.panelMain.mark.setLightAtt(Att.CHR, 0, "Q");
    146                                         dlg.panelMain.mark.setLightAtt(Att.GRP, 0, "");
     145                                        SmedAction.panelMain.mark.setLightAtt(Att.CHR, 0, "Q");
     146                                        SmedAction.panelMain.mark.setLightAtt(Att.GRP, 0, "");
    147147                                        break;
    148148                                case CAM_SOUTH:
    149                                         dlg.panelMain.mark.setLightAtt(Att.CHR, 0, "Q+LFl");
    150                                         dlg.panelMain.mark.setLightAtt(Att.GRP, 0, "6");
     149                                        SmedAction.panelMain.mark.setLightAtt(Att.CHR, 0, "Q+LFl");
     150                                        SmedAction.panelMain.mark.setLightAtt(Att.GRP, 0, "6");
    151151                                        break;
    152152                                case CAM_EAST:
    153                                         dlg.panelMain.mark.setLightAtt(Att.CHR, 0, "Q");
    154                                         dlg.panelMain.mark.setLightAtt(Att.GRP, 0, "3");
     153                                        SmedAction.panelMain.mark.setLightAtt(Att.CHR, 0, "Q");
     154                                        SmedAction.panelMain.mark.setLightAtt(Att.GRP, 0, "3");
    155155                                        break;
    156156                                case CAM_WEST:
    157                                         dlg.panelMain.mark.setLightAtt(Att.CHR, 0, "Q");
    158                                         dlg.panelMain.mark.setLightAtt(Att.GRP, 0, "9");
     157                                        SmedAction.panelMain.mark.setLightAtt(Att.CHR, 0, "Q");
     158                                        SmedAction.panelMain.mark.setLightAtt(Att.GRP, 0, "9");
    159159                                        break;
    160160                                default:
    161                                         dlg.panelMain.mark.setLightAtt(Att.CHR, 0, "Fl");
    162                                         dlg.panelMain.mark.setLightAtt(Att.GRP, 0, "2");
     161                                        SmedAction.panelMain.mark.setLightAtt(Att.CHR, 0, "Fl");
     162                                        SmedAction.panelMain.mark.setLightAtt(Att.GRP, 0, "2");
    163163                                        break;
    164164                                }
    165165                                lightButton.setBorderPainted(true);
    166166                        } else {
    167                                 dlg.panelMain.mark.clrLight();
     167                                SmedAction.panelMain.mark.clrLight();
    168168                                lightButton.setBorderPainted(false);
    169169                        }
    170                         dlg.panelMain.panelLit.syncPanel();
     170                        SmedAction.panelMain.panelLit.syncPanel();
    171171                }
    172172        };
     
    205205
    206206        public void syncPanel() {
    207                 northButton.setBorderPainted(dlg.panelMain.mark.getCategory() == Cat.CAM_NORTH);
    208                 southButton.setBorderPainted(dlg.panelMain.mark.getCategory() == Cat.CAM_SOUTH);
    209                 eastButton.setBorderPainted(dlg.panelMain.mark.getCategory() == Cat.CAM_EAST);
    210                 westButton.setBorderPainted(dlg.panelMain.mark.getCategory() == Cat.CAM_WEST);
    211                 isolButton.setBorderPainted(SeaMark.GrpMAP.get(dlg.panelMain.mark.getObject()) == Grp.ISD);
     207                northButton.setBorderPainted(SmedAction.panelMain.mark.getCategory() == Cat.CAM_NORTH);
     208                southButton.setBorderPainted(SmedAction.panelMain.mark.getCategory() == Cat.CAM_SOUTH);
     209                eastButton.setBorderPainted(SmedAction.panelMain.mark.getCategory() == Cat.CAM_EAST);
     210                westButton.setBorderPainted(SmedAction.panelMain.mark.getCategory() == Cat.CAM_WEST);
     211                isolButton.setBorderPainted(SeaMark.GrpMAP.get(SmedAction.panelMain.mark.getObject()) == Grp.ISD);
    212212                for (Shp shp : shapes.keySet()) {
    213213                        JRadioButton button = shapes.get(shp);
    214                         button.setBorderPainted(dlg.panelMain.mark.getShape() == shp);
    215                 }
    216                 topmarkButton.setBorderPainted(dlg.panelMain.mark.getTopmark() != Top.NOTOP);
    217                 topmarkButton.setSelected(dlg.panelMain.mark.getTopmark() != Top.NOTOP);
    218                 topmarkButton.setVisible(dlg.panelMain.mark.testValid());
    219                 Boolean lit = (dlg.panelMain.mark.getLightAtt(Att.COL, 0) != Col.UNKCOL) && !((String)dlg.panelMain.mark.getLightAtt(Att.CHR, 0)).isEmpty();
     214                        button.setBorderPainted(SmedAction.panelMain.mark.getShape() == shp);
     215                }
     216                topmarkButton.setBorderPainted(SmedAction.panelMain.mark.getTopmark() != Top.NOTOP);
     217                topmarkButton.setSelected(SmedAction.panelMain.mark.getTopmark() != Top.NOTOP);
     218                topmarkButton.setVisible(SmedAction.panelMain.mark.testValid());
     219                Boolean lit = (SmedAction.panelMain.mark.getLightAtt(Att.COL, 0) != Col.UNKCOL) && !((String)SmedAction.panelMain.mark.getLightAtt(Att.CHR, 0)).isEmpty();
    220220                lightButton.setBorderPainted(lit);
    221221                lightButton.setSelected(lit);
    222                 lightButton.setVisible(dlg.panelMain.mark.testValid());
     222                lightButton.setVisible(SmedAction.panelMain.mark.testValid());
    223223        }
    224224
  • applications/editors/josm/plugins/smed/src/panels/PanelLights.java

    r30737 r30738  
    2525                                int idx = landCats.get(cat);
    2626                                if (dlg.node != null && (idx == landCatBox.getSelectedIndex())) {
    27                                         dlg.panelMain.mark.setCategory(cat);
    28                                         dlg.panelMain.mark.testValid();
     27                                        SmedAction.panelMain.mark.setCategory(cat);
     28                                        SmedAction.panelMain.mark.testValid();
    2929                                }
    3030                        }
     
    3838                                int idx = trafficCats.get(cat);
    3939                                if (dlg.node != null && (idx == trafficCatBox.getSelectedIndex())) {
    40                                         dlg.panelMain.mark.setCategory(cat);
    41                                         dlg.panelMain.mark.testValid();
     40                                        SmedAction.panelMain.mark.setCategory(cat);
     41                                        SmedAction.panelMain.mark.testValid();
    4242                                }
    4343                        }
     
    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();
     53                                        SmedAction.panelMain.mark.setCategory(cat);
     54                                        SmedAction.panelMain.mark.testValid();
    5555                                }
    5656                        }
     
    6464                                int idx = platformCats.get(cat);
    6565                                if (dlg.node != null && (idx == platformCatBox.getSelectedIndex())) {
    66                                         dlg.panelMain.mark.setCategory(cat);
    67                                         dlg.panelMain.mark.testValid();
     66                                        SmedAction.panelMain.mark.setCategory(cat);
     67                                        SmedAction.panelMain.mark.testValid();
    6868                                }
    6969                        }
     
    7777                                int idx = pilotCats.get(cat);
    7878                                if (dlg.node != null && (idx == pilotCatBox.getSelectedIndex())) {
    79                                         dlg.panelMain.mark.setCategory(cat);
    80                                         dlg.panelMain.mark.testValid();
     79                                        SmedAction.panelMain.mark.setCategory(cat);
     80                                        SmedAction.panelMain.mark.testValid();
    8181                                }
    8282                        }
     
    9090                                int idx = rescueCats.get(cat);
    9191                                if (dlg.node != null && (idx == rescueCatBox.getSelectedIndex())) {
    92                                         dlg.panelMain.mark.setCategory(cat);
    93                                         dlg.panelMain.mark.testValid();
     92                                        SmedAction.panelMain.mark.setCategory(cat);
     93                                        SmedAction.panelMain.mark.testValid();
    9494                                }
    9595                        }
     
    103103                                int idx = radioCats.get(cat);
    104104                                if (dlg.node != null && (idx == radioCatBox.getSelectedIndex())) {
    105                                         dlg.panelMain.mark.setCategory(cat);
    106                                         dlg.panelMain.mark.testValid();
     105                                        SmedAction.panelMain.mark.setCategory(cat);
     106                                        SmedAction.panelMain.mark.testValid();
    107107                                }
    108108                        }
     
    116116                                int idx = radarCats.get(cat);
    117117                                if (dlg.node != null && (idx == radarCatBox.getSelectedIndex())) {
    118                                         dlg.panelMain.mark.setCategory(cat);
    119                                         dlg.panelMain.mark.testValid();
     118                                        SmedAction.panelMain.mark.setCategory(cat);
     119                                        SmedAction.panelMain.mark.testValid();
    120120                                }
    121121                        }
     
    130130                                int idx = functions.get(fnc);
    131131                                if (dlg.node != null && (idx == functionBox.getSelectedIndex())) {
    132                                         dlg.panelMain.mark.setFunc(fnc);
    133                                         dlg.panelMain.mark.testValid();
     132                                        SmedAction.panelMain.mark.setFunc(fnc);
     133                                        SmedAction.panelMain.mark.testValid();
    134134                                }
    135135                        }
     
    157157                                JRadioButton button = objects.get(obj);
    158158                                if (button.isSelected()) {
    159                                         dlg.panelMain.mark.setObject(obj);
     159                                        SmedAction.panelMain.mark.setObject(obj);
    160160                                        button.setBorderPainted(true);
    161161                                } else
    162162                                        button.setBorderPainted(false);
    163163                        }
    164                         if (dlg.panelMain.mark.getObject() == Obj.LITVES)
    165                                 dlg.panelMain.mark.setShape(Shp.SUPER);
    166                         else if (dlg.panelMain.mark.getObject() == Obj.LITFLT)
    167                                 dlg.panelMain.mark.setShape(Shp.FLOAT);
    168                         else dlg.panelMain.mark.setShape(Shp.UNKSHP);
     164                        if (SmedAction.panelMain.mark.getObject() == Obj.LITVES)
     165                                SmedAction.panelMain.mark.setShape(Shp.SUPER);
     166                        else if (SmedAction.panelMain.mark.getObject() == Obj.LITFLT)
     167                                SmedAction.panelMain.mark.setShape(Shp.FLOAT);
     168                        else SmedAction.panelMain.mark.setShape(Shp.UNKSHP);
    169169                        functionLabel.setVisible(false);
    170170                        categoryLabel.setVisible(false);
     
    181181                        chLabel.setVisible(false);
    182182                        chBox.setVisible(false);
    183                         dlg.panelMain.mark.setCategory(Cat.NOCAT);
     183                        SmedAction.panelMain.mark.setCategory(Cat.NOCAT);
    184184                        if (landButton.isSelected()) {
    185185                                functionLabel.setVisible(true);
     
    227227                                alRadarCatBox.actionPerformed(null);
    228228                        }
    229                         dlg.panelMain.mark.testValid();
     229                        SmedAction.panelMain.mark.testValid();
    230230                }
    231231        };
     
    234234        private FocusListener flCh = new FocusAdapter() {
    235235                public void focusLost(java.awt.event.FocusEvent e) {
    236                         dlg.panelMain.mark.setChannel(chBox.getText());
     236                        SmedAction.panelMain.mark.setChannel(chBox.getText());
    237237                }
    238238        };
     
    462462                chLabel.setVisible(false);
    463463                chBox.setVisible(false);
    464                 chBox.setText(dlg.panelMain.mark.getChannel());
    465                 if ((dlg.panelMain.mark.getObject() == Obj.LNDMRK) && ((dlg.panelMain.mark.getCategory() != Cat.NOCAT) || (dlg.panelMain.mark.getFunc() != Fnc.UNKFNC))) {
     464                chBox.setText(SmedAction.panelMain.mark.getChannel());
     465                if ((SmedAction.panelMain.mark.getObject() == Obj.LNDMRK) && ((SmedAction.panelMain.mark.getCategory() != Cat.NOCAT) || (SmedAction.panelMain.mark.getFunc() != Fnc.UNKFNC))) {
    466466                        functionLabel.setVisible(true);
    467467                        categoryLabel.setVisible(true);
     
    470470                        for (Fnc fnc : functions.keySet()) {
    471471                                int item = functions.get(fnc);
    472                                 if (dlg.panelMain.mark.getFunc() == fnc)
     472                                if (SmedAction.panelMain.mark.getFunc() == fnc)
    473473                                        functionBox.setSelectedIndex(item);
    474474                        }
    475475                        for (Cat cat : landCats.keySet()) {
    476476                                int item = landCats.get(cat);
    477                                 if (dlg.panelMain.mark.getCategory() == cat)
     477                                if (SmedAction.panelMain.mark.getCategory() == cat)
    478478                                        landCatBox.setSelectedIndex(item);
    479479                        }
    480                 } else if (dlg.panelMain.mark.getObject() == Obj.SISTAT) {
     480                } else if (SmedAction.panelMain.mark.getObject() == Obj.SISTAT) {
    481481                                categoryLabel.setVisible(true);
    482482                                trafficCatBox.setVisible(true);
    483483                                for (Cat cat : trafficCats.keySet()) {
    484484                                        int item = trafficCats.get(cat);
    485                                         if (dlg.panelMain.mark.getCategory() == cat)
     485                                        if (SmedAction.panelMain.mark.getCategory() == cat)
    486486                                                trafficCatBox.setSelectedIndex(item);
    487487                                }
    488488                                chLabel.setVisible(true);
    489489                                chBox.setVisible(true);
    490                 } else if (dlg.panelMain.mark.getObject() == Obj.SISTAW) {
     490                } else if (SmedAction.panelMain.mark.getObject() == Obj.SISTAW) {
    491491                        categoryLabel.setVisible(true);
    492492                        warningCatBox.setVisible(true);
    493493                        for (Cat cat : warningCats.keySet()) {
    494494                                int item = warningCats.get(cat);
    495                                 if (dlg.panelMain.mark.getCategory() == cat)
     495                                if (SmedAction.panelMain.mark.getCategory() == cat)
    496496                                        warningCatBox.setSelectedIndex(item);
    497497                        }
    498498                        chLabel.setVisible(true);
    499499                        chBox.setVisible(true);
    500                 } else if (dlg.panelMain.mark.getObject() == Obj.OFSPLF) {
     500                } else if (SmedAction.panelMain.mark.getObject() == Obj.OFSPLF) {
    501501                        categoryLabel.setVisible(true);
    502502                        platformCatBox.setVisible(true);
    503503                        for (Cat cat : platformCats.keySet()) {
    504504                                int item = platformCats.get(cat);
    505                                 if (dlg.panelMain.mark.getCategory() == cat)
     505                                if (SmedAction.panelMain.mark.getCategory() == cat)
    506506                                        platformCatBox.setSelectedIndex(item);
    507507                        }
    508                 } else if (dlg.panelMain.mark.getObject() == Obj.PILBOP) {
     508                } else if (SmedAction.panelMain.mark.getObject() == Obj.PILBOP) {
    509509                        categoryLabel.setVisible(true);
    510510                        pilotCatBox.setVisible(true);
    511511                        for (Cat cat : pilotCats.keySet()) {
    512512                                int item = pilotCats.get(cat);
    513                                 if (dlg.panelMain.mark.getCategory() == cat)
     513                                if (SmedAction.panelMain.mark.getCategory() == cat)
    514514                                        pilotCatBox.setSelectedIndex(item);
    515515                        }
    516516                        chLabel.setVisible(true);
    517517                        chBox.setVisible(true);
    518                 } else if (dlg.panelMain.mark.getObject() == Obj.RSCSTA) {
     518                } else if (SmedAction.panelMain.mark.getObject() == Obj.RSCSTA) {
    519519                        categoryLabel.setVisible(true);
    520520                        rescueCatBox.setVisible(true);
    521521                        for (Cat cat : rescueCats.keySet()) {
    522522                                int item = rescueCats.get(cat);
    523                                 if (dlg.panelMain.mark.getCategory() == cat)
     523                                if (SmedAction.panelMain.mark.getCategory() == cat)
    524524                                        rescueCatBox.setSelectedIndex(item);
    525525                        }
    526                 } else if (dlg.panelMain.mark.getObject() == Obj.RDOSTA) {
     526                } else if (SmedAction.panelMain.mark.getObject() == Obj.RDOSTA) {
    527527                        categoryLabel.setVisible(true);
    528528                        radioCatBox.setVisible(true);
    529529                        for (Cat cat : radioCats.keySet()) {
    530530                                int item = radioCats.get(cat);
    531                                 if (dlg.panelMain.mark.getCategory() == cat)
     531                                if (SmedAction.panelMain.mark.getCategory() == cat)
    532532                                        radioCatBox.setSelectedIndex(item);
    533533                        }
    534534                        chLabel.setVisible(true);
    535535                        chBox.setVisible(true);
    536                 } else if (dlg.panelMain.mark.getObject() == Obj.RADSTA) {
     536                } else if (SmedAction.panelMain.mark.getObject() == Obj.RADSTA) {
    537537                        categoryLabel.setVisible(true);
    538538                        radarCatBox.setVisible(true);
    539539                        for (Cat cat : radarCats.keySet()) {
    540540                                int item = radarCats.get(cat);
    541                                 if (dlg.panelMain.mark.getCategory() == cat)
     541                                if (SmedAction.panelMain.mark.getCategory() == cat)
    542542                                        radarCatBox.setSelectedIndex(item);
    543543                        }
     
    547547                for (Obj obj : objects.keySet()) {
    548548                        JRadioButton button = objects.get(obj);
    549                         button.setBorderPainted(dlg.panelMain.mark.getObject() == obj);
    550                 }
    551                 dlg.panelMain.mark.testValid();
     549                        button.setBorderPainted(SmedAction.panelMain.mark.getObject() == obj);
     550                }
     551                SmedAction.panelMain.mark.testValid();
    552552        }
    553553       
  • applications/editors/josm/plugins/smed/src/panels/PanelLit.java

    r30737 r30738  
    2121        private FocusListener flGroup = new FocusAdapter() {
    2222                public void focusLost(java.awt.event.FocusEvent e) {
    23                         dlg.panelMain.mark.setLightAtt(Att.GRP, 0, groupBox.getText());
     23                        SmedAction.panelMain.mark.setLightAtt(Att.GRP, 0, groupBox.getText());
    2424                }
    2525        };
     
    2828        private FocusListener flPeriod = new FocusAdapter() {
    2929                public void focusLost(java.awt.event.FocusEvent e) {
    30                         dlg.panelMain.mark.setLightAtt(Att.PER, 0, periodBox.getText());
     30                        SmedAction.panelMain.mark.setLightAtt(Att.PER, 0, periodBox.getText());
    3131                }
    3232        };
     
    3535        private FocusListener flSequence = new FocusAdapter() {
    3636                public void focusLost(java.awt.event.FocusEvent e) {
    37                         dlg.panelMain.mark.setLightAtt(Att.SEQ, 0, sequenceBox.getText());
     37                        SmedAction.panelMain.mark.setLightAtt(Att.SEQ, 0, sequenceBox.getText());
    3838                }
    3939        };
     
    4646                                int idx = visibilities.get(vis);
    4747                                if (idx == visibilityBox.getSelectedIndex())
    48                                         dlg.panelMain.mark.setLightAtt(Att.VIS, 0, vis);
     48                                        SmedAction.panelMain.mark.setLightAtt(Att.VIS, 0, vis);
    4949                        }
    5050                }
     
    5454        private FocusListener flHeight = new FocusAdapter() {
    5555                public void focusLost(java.awt.event.FocusEvent e) {
    56                         dlg.panelMain.mark.setLightAtt(Att.HGT, 0, heightBox.getText());
     56                        SmedAction.panelMain.mark.setLightAtt(Att.HGT, 0, heightBox.getText());
    5757                }
    5858        };
     
    6161        private FocusListener flRange = new FocusAdapter() {
    6262                public void focusLost(java.awt.event.FocusEvent e) {
    63                         dlg.panelMain.mark.setLightAtt(Att.RNG, 0, rangeBox.getText());
     63                        SmedAction.panelMain.mark.setLightAtt(Att.RNG, 0, rangeBox.getText());
    6464                }
    6565        };
     
    6868        private FocusListener flOrientation = new FocusAdapter() {
    6969                public void focusLost(java.awt.event.FocusEvent e) {
    70                         dlg.panelMain.mark.setLightAtt(Att.ORT, 0, orientationBox.getText());
     70                        SmedAction.panelMain.mark.setLightAtt(Att.ORT, 0, orientationBox.getText());
    7171                }
    7272        };
     
    7575        private FocusListener flMultiple = new FocusAdapter() {
    7676                public void focusLost(java.awt.event.FocusEvent e) {
    77                         dlg.panelMain.mark.setLightAtt(Att.MLT, 0, multipleBox.getText());
     77                        SmedAction.panelMain.mark.setLightAtt(Att.MLT, 0, multipleBox.getText());
    7878                }
    7979        };
     
    8686                                int idx = categories.get(lit);
    8787                                if (idx == categoryBox.getSelectedIndex())
    88                                         dlg.panelMain.mark.setLightAtt(Att.LIT, 0, lit);
    89                         }
    90                         if (dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.DIR) {
    91                                 dlg.panelMain.mark.setLightAtt(Att.MLT, 0, "");
     88                                        SmedAction.panelMain.mark.setLightAtt(Att.LIT, 0, lit);
     89                        }
     90                        if (SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.DIR) {
     91                                SmedAction.panelMain.mark.setLightAtt(Att.MLT, 0, "");
    9292                                multipleBox.setText("");
    9393                                orientationLabel.setVisible(true);
     
    9595                                multipleLabel.setVisible(false);
    9696                                multipleBox.setVisible(false);
    97                         } else if ((dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.VERT) || (dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.HORIZ)) {
    98                                 dlg.panelMain.mark.setLightAtt(Att.ORT, 0, "");
     97                        } else if ((SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.VERT) || (SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.HORIZ)) {
     98                                SmedAction.panelMain.mark.setLightAtt(Att.ORT, 0, "");
    9999                                orientationBox.setText("");
    100100                                orientationLabel.setVisible(false);
     
    103103                                multipleBox.setVisible(true);
    104104                        } else {
    105                                 dlg.panelMain.mark.setLightAtt(Att.MLT, 0, "");
     105                                SmedAction.panelMain.mark.setLightAtt(Att.MLT, 0, "");
    106106                                multipleBox.setText("");
    107                                 dlg.panelMain.mark.setLightAtt(Att.ORT, 0, "");
     107                                SmedAction.panelMain.mark.setLightAtt(Att.ORT, 0, "");
    108108                                orientationBox.setText("");
    109109                                orientationLabel.setVisible(false);
     
    122122                                int idx = exhibitions.get(exh);
    123123                                if (idx == exhibitionBox.getSelectedIndex())
    124                                         dlg.panelMain.mark.setLightAtt(Att.EXH, 0, exh);
     124                                        SmedAction.panelMain.mark.setLightAtt(Att.EXH, 0, exh);
    125125                        }
    126126                }
     
    137137                        } else {
    138138                                panelSector.setVisible(false);
    139                                 while (dlg.panelMain.mark.getSectorCount() > 1)
    140                                         dlg.panelMain.mark.delLight(1);
     139                                while (SmedAction.panelMain.mark.getSectorCount() > 1)
     140                                        SmedAction.panelMain.mark.delLight(1);
    141141                        }
    142142                }
     
    285285                multipleLabel.setVisible(false);
    286286                multipleBox.setVisible(false);
    287                 groupBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.GRP, 0));
    288                 periodBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.PER, 0));
    289                 sequenceBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.SEQ, 0));
    290                 heightBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.HGT, 0));
    291                 rangeBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.RNG, 0));
    292                 orientationBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.ORT, 0));
    293                 orientationBox.setVisible(dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.DIR);
    294                 multipleBox.setText((String)dlg.panelMain.mark.getLightAtt(Att.MLT, 0));
    295                 multipleBox.setVisible((dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.VERT) || (dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.HORIZ));
     287                groupBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.GRP, 0));
     288                periodBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.PER, 0));
     289                sequenceBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.SEQ, 0));
     290                heightBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.HGT, 0));
     291                rangeBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.RNG, 0));
     292                orientationBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.ORT, 0));
     293                orientationBox.setVisible(SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.DIR);
     294                multipleBox.setText((String)SmedAction.panelMain.mark.getLightAtt(Att.MLT, 0));
     295                multipleBox.setVisible((SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.VERT) || (SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == Lit.HORIZ));
    296296                for (Vis vis : visibilities.keySet()) {
    297297                        int item = visibilities.get(vis);
    298                         if (dlg.panelMain.mark.getLightAtt(Att.VIS, 0) == vis)
     298                        if (SmedAction.panelMain.mark.getLightAtt(Att.VIS, 0) == vis)
    299299                                visibilityBox.setSelectedIndex(item);
    300300                }
    301301                for (Lit lit : categories.keySet()) {
    302302                        int item = categories.get(lit);
    303                         if (dlg.panelMain.mark.getLightAtt(Att.LIT, 0) == lit)
     303                        if (SmedAction.panelMain.mark.getLightAtt(Att.LIT, 0) == lit)
    304304                                categoryBox.setSelectedIndex(item);
    305305                }
    306306                for (Exh exh : exhibitions.keySet()) {
    307307                        int item = exhibitions.get(exh);
    308                         if (dlg.panelMain.mark.getLightAtt(Att.EXH, 0) == exh)
     308                        if (SmedAction.panelMain.mark.getLightAtt(Att.EXH, 0) == exh)
    309309                                exhibitionBox.setSelectedIndex(item);
    310310                }
    311                 if (dlg.panelMain.mark.isSectored()) {
     311                if (SmedAction.panelMain.mark.isSectored()) {
    312312                        singleButton.setBorderPainted(false);
    313313                        sectorButton.setBorderPainted(true);
     
    317317                        sectorButton.setBorderPainted(false);
    318318                        panelSector.setVisible(false);
    319                         while (dlg.panelMain.mark.getSectorCount() > 1)
    320                                 dlg.panelMain.mark.delLight(dlg.panelMain.mark.getSectorCount() - 1);
     319                        while (SmedAction.panelMain.mark.getSectorCount() > 1)
     320                                SmedAction.panelMain.mark.delLight(SmedAction.panelMain.mark.getSectorCount() - 1);
    321321                }
    322322                panelCol.syncPanel();
  • applications/editors/josm/plugins/smed/src/panels/PanelMore.java

    r30737 r30738  
    1919        private FocusListener flInfo = new FocusAdapter() {
    2020                public void focusLost(java.awt.event.FocusEvent e) {
    21                         dlg.panelMain.mark.setInfo(infoBox.getText());
     21                        SmedAction.panelMain.mark.setInfo(infoBox.getText());
    2222                }
    2323        };
     
    2626        private FocusListener flSource = new FocusAdapter() {
    2727                public void focusLost(java.awt.event.FocusEvent e) {
    28                         dlg.panelMain.mark.setSource(sourceBox.getText());
     28                        SmedAction.panelMain.mark.setSource(sourceBox.getText());
    2929                }
    3030        };
     
    3333        private FocusListener flElev = new FocusAdapter() {
    3434                public void focusLost(java.awt.event.FocusEvent e) {
    35                         dlg.panelMain.mark.setElevation(elevBox.getText());
     35                        SmedAction.panelMain.mark.setElevation(elevBox.getText());
    3636                }
    3737        };
     
    4040        private FocusListener flHeight = new FocusAdapter() {
    4141                public void focusLost(java.awt.event.FocusEvent e) {
    42                         dlg.panelMain.mark.setObjectHeight(heightBox.getText());
     42                        SmedAction.panelMain.mark.setObjectHeight(heightBox.getText());
    4343                }
    4444        };
     
    5050                        for (Sts sts : statuses.keySet()) {
    5151                                int idx = statuses.get(sts);
    52                                 if (dlg.panelMain.mark != null && (idx == statusBox.getSelectedIndex()))
    53                                         dlg.panelMain.mark.setStatus(sts);
     52                                if (SmedAction.panelMain.mark != null && (idx == statusBox.getSelectedIndex()))
     53                                        SmedAction.panelMain.mark.setStatus(sts);
    5454                        }
    5555                }
     
    6262                        for (Cns cns : constructions.keySet()) {
    6363                                int idx = constructions.get(cns);
    64                                 if (dlg.panelMain.mark != null && (idx == constrBox.getSelectedIndex()))
    65                                         dlg.panelMain.mark.setConstr(cns);
     64                                if (SmedAction.panelMain.mark != null && (idx == constrBox.getSelectedIndex()))
     65                                        SmedAction.panelMain.mark.setConstr(cns);
    6666                        }
    6767                }
     
    7474                        for (Con con : conspicuities.keySet()) {
    7575                                int idx = conspicuities.get(con);
    76                                 if (dlg.panelMain.mark != null && (idx == conBox.getSelectedIndex()))
    77                                         dlg.panelMain.mark.setConsp(con);
     76                                if (SmedAction.panelMain.mark != null && (idx == conBox.getSelectedIndex()))
     77                                        SmedAction.panelMain.mark.setConsp(con);
    7878                        }
    7979                }
     
    8686                        for (Con con : reflectivities.keySet()) {
    8787                                int idx = reflectivities.get(con);
    88                                 if (dlg.panelMain.mark != null && (idx == reflBox.getSelectedIndex()))
    89                                         dlg.panelMain.mark.setRefl(con);
     88                                if (SmedAction.panelMain.mark != null && (idx == reflBox.getSelectedIndex()))
     89                                        SmedAction.panelMain.mark.setRefl(con);
    9090                        }
    9191                }
     
    9999                public void actionPerformed(java.awt.event.ActionEvent e) {
    100100                        if (regionAButton.isSelected()) {
    101                                 dlg.panelMain.mark.setRegion(Reg.A);
     101                                SmedAction.panelMain.mark.setRegion(Reg.A);
    102102                                switch (dlg.panelMain.mark.getCategory()) {
    103103                                case LAM_PORT:
  • applications/editors/josm/plugins/smed/src/panels/PanelPat.java

    r30737 r30738  
    3131                                JRadioButton button = patterns.get(pat);
    3232                                if (button.isSelected()) {
    33                                         dlg.panelMain.mark.setPattern(ent, pat);
     33                                        SmedAction.panelMain.mark.setPattern(ent, pat);
    3434                                        button.setBorderPainted(true);
    3535                                } else
    3636                                        button.setBorderPainted(false);
    3737                        }
    38                         switch (dlg.panelMain.mark.getPattern(ent)) {
     38                        switch (SmedAction.panelMain.mark.getPattern(ent)) {
    3939                        case NOPAT:
    4040                                panelCol.trimStack(1);
     
    7474                for (Pat pat : patterns.keySet()) {
    7575                        JRadioButton button = patterns.get(pat);
    76                         if (dlg.panelMain.mark.getPattern(ent) == pat) {
     76                        if (SmedAction.panelMain.mark.getPattern(ent) == pat) {
    7777                                button.setBorderPainted(true);
    7878                        } else
  • applications/editors/josm/plugins/smed/src/panels/PanelPort.java

    r30737 r30738  
    3131                                JRadioButton button = shapes.get(shp);
    3232                                if (button.isSelected()) {
    33                                         dlg.panelMain.mark.setShape(shp);
    34                                         dlg.panelMain.mark.setObject(objects.get(shp));
     33                                        SmedAction.panelMain.mark.setShape(shp);
     34                                        SmedAction.panelMain.mark.setObject(objects.get(shp));
    3535                                        button.setBorderPainted(true);
    3636                                } else
    3737                                        button.setBorderPainted(false);
    3838                        }
    39                         if (dlg.panelMain.mark.testValid()) {
    40                                 dlg.panelMain.panelChan.topmarkButton.setVisible(true);
    41                                 dlg.panelMain.panelChan.lightButton.setVisible(true);
    42                                 if (dlg.panelMain.mark.getCategory() == Cat.LAM_PORT) {
    43                                         switch (dlg.panelMain.mark.getRegion()) {
     39                        if (SmedAction.panelMain.mark.testValid()) {
     40                                SmedAction.panelMain.panelChan.topmarkButton.setVisible(true);
     41                                SmedAction.panelMain.panelChan.lightButton.setVisible(true);
     42                                if (SmedAction.panelMain.mark.getCategory() == Cat.LAM_PORT) {
     43                                        switch (SmedAction.panelMain.mark.getRegion()) {
    4444                                        case A:
    45                                                 dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    46                                                 dlg.panelMain.mark.setObjColour(Col.RED);
     45                                                SmedAction.panelMain.mark.setObjPattern(Pat.NOPAT);
     46                                                SmedAction.panelMain.mark.setObjColour(Col.RED);
    4747                                                break;
    4848                                        case B:
    49                                                 dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    50                                                 dlg.panelMain.mark.setObjColour(Col.GREEN);
     49                                                SmedAction.panelMain.mark.setObjPattern(Pat.NOPAT);
     50                                                SmedAction.panelMain.mark.setObjColour(Col.GREEN);
    5151                                                break;
    5252                                        case C:
    53                                                 dlg.panelMain.mark.setObjPattern(Pat.HSTRP);
    54                                                 dlg.panelMain.mark.setObjColour(Col.RED);
    55                                                 dlg.panelMain.mark.addObjColour(Col.WHITE);
    56                                                 dlg.panelMain.mark.addObjColour(Col.RED);
    57                                                 dlg.panelMain.mark.addObjColour(Col.WHITE);
     53                                                SmedAction.panelMain.mark.setObjPattern(Pat.HSTRP);
     54                                                SmedAction.panelMain.mark.setObjColour(Col.RED);
     55                                                SmedAction.panelMain.mark.addObjColour(Col.WHITE);
     56                                                SmedAction.panelMain.mark.addObjColour(Col.RED);
     57                                                SmedAction.panelMain.mark.addObjColour(Col.WHITE);
    5858                                                break;
    5959                                        }
    6060                                } else {
    61                                         dlg.panelMain.mark.setObjPattern(Pat.HSTRP);
    62                                         switch (dlg.panelMain.mark.getRegion()) {
     61                                        SmedAction.panelMain.mark.setObjPattern(Pat.HSTRP);
     62                                        switch (SmedAction.panelMain.mark.getRegion()) {
    6363                                        case A:
    64                                                 dlg.panelMain.mark.setObjColour(Col.RED);
    65                                                 dlg.panelMain.mark.addObjColour(Col.GREEN);
    66                                                 dlg.panelMain.mark.addObjColour(Col.RED);
     64                                                SmedAction.panelMain.mark.setObjColour(Col.RED);
     65                                                SmedAction.panelMain.mark.addObjColour(Col.GREEN);
     66                                                SmedAction.panelMain.mark.addObjColour(Col.RED);
    6767                                                break;
    6868                                        case B:
    69                                                 dlg.panelMain.mark.setObjColour(Col.GREEN);
    70                                                 dlg.panelMain.mark.addObjColour(Col.RED);
    71                                                 dlg.panelMain.mark.addObjColour(Col.GREEN);
     69                                                SmedAction.panelMain.mark.setObjColour(Col.GREEN);
     70                                                SmedAction.panelMain.mark.addObjColour(Col.RED);
     71                                                SmedAction.panelMain.mark.addObjColour(Col.GREEN);
    7272                                                break;
    7373                                        case C:
    74                                                 dlg.panelMain.mark.setObjColour(Col.RED);
    75                                                 dlg.panelMain.mark.addObjColour(Col.GREEN);
    76                                                 dlg.panelMain.mark.addObjColour(Col.RED);
    77                                                 dlg.panelMain.mark.addObjColour(Col.GREEN);
     74                                                SmedAction.panelMain.mark.setObjColour(Col.RED);
     75                                                SmedAction.panelMain.mark.addObjColour(Col.GREEN);
     76                                                SmedAction.panelMain.mark.addObjColour(Col.RED);
     77                                                SmedAction.panelMain.mark.addObjColour(Col.GREEN);
    7878                                                break;
    7979                                        }
    8080                                }
    81                                 dlg.panelMain.panelMore.syncPanel();
     81                                SmedAction.panelMain.panelMore.syncPanel();
    8282                        } else {
    83                                 dlg.panelMain.panelChan.topmarkButton.setVisible(false);
    84                                 dlg.panelMain.panelChan.lightButton.setVisible(false);
     83                                SmedAction.panelMain.panelChan.topmarkButton.setVisible(false);
     84                                SmedAction.panelMain.panelChan.lightButton.setVisible(false);
    8585                        }
    8686                }
     
    104104                for (Shp shp : shapes.keySet()) {
    105105                        JRadioButton button = shapes.get(shp);
    106                         if (dlg.panelMain.mark.getShape() == shp) {
     106                        if (SmedAction.panelMain.mark.getShape() == shp) {
    107107                                button.setBorderPainted(true);
    108108                        } else
  • applications/editors/josm/plugins/smed/src/panels/PanelRadar.java

    r30737 r30738  
    3535                                int idx = radioCats.get(cat);
    3636                                if (dlg.node != null && (idx == radioCatBox.getSelectedIndex())) {
    37                                         dlg.panelMain.mark.setRadio(cat);
     37                                        SmedAction.panelMain.mark.setRadio(cat);
    3838                                }
    3939                        }
     
    5252                                JRadioButton button = rads.get(rtb);
    5353                                if (button.isSelected()) {
    54                                         dlg.panelMain.mark.setRadar(rtb);
     54                                        SmedAction.panelMain.mark.setRadar(rtb);
    5555                                }
    5656                        }
     
    6262        private FocusListener flGroup = new FocusAdapter() {
    6363                public void focusLost(java.awt.event.FocusEvent e) {
    64                         dlg.panelMain.mark.setRaconGroup(groupBox.getText());
     64                        SmedAction.panelMain.mark.setRaconGroup(groupBox.getText());
    6565                }
    6666        };
     
    6969        private FocusListener flPeriod = new FocusAdapter() {
    7070                public void focusLost(java.awt.event.FocusEvent e) {
    71                         dlg.panelMain.mark.setRaconPeriod(periodBox.getText());
     71                        SmedAction.panelMain.mark.setRaconPeriod(periodBox.getText());
    7272                }
    7373        };
     
    7676        private FocusListener flSeq = new FocusAdapter() {
    7777                public void focusLost(java.awt.event.FocusEvent e) {
    78                         dlg.panelMain.mark.setRaconSequence(seqBox.getText());
     78                        SmedAction.panelMain.mark.setRaconSequence(seqBox.getText());
    7979                }
    8080        };
     
    8383        private FocusListener flRange = new FocusAdapter() {
    8484                public void focusLost(java.awt.event.FocusEvent e) {
    85                         dlg.panelMain.mark.setRaconRange(rangeBox.getText());
     85                        SmedAction.panelMain.mark.setRaconRange(rangeBox.getText());
    8686                }
    8787        };
     
    9090        private FocusListener flSector1 = new FocusAdapter() {
    9191                public void focusLost(java.awt.event.FocusEvent e) {
    92                         dlg.panelMain.mark.setRaconSector1(sector1Box.getText());
     92                        SmedAction.panelMain.mark.setRaconSector1(sector1Box.getText());
    9393                }
    9494        };
     
    9797        private FocusListener flSector2 = new FocusAdapter() {
    9898                public void focusLost(java.awt.event.FocusEvent e) {
    99                         dlg.panelMain.mark.setRaconSector2(sector2Box.getText());
     99                        SmedAction.panelMain.mark.setRaconSector2(sector2Box.getText());
    100100                }
    101101        };
     
    204204
    205205        public void syncPanel() {
    206                 boolean rad = ((dlg.panelMain.mark.getRadar() != Rtb.NORTB) && (dlg.panelMain.mark.getRadar() != Rtb.REFLECTOR));
     206                boolean rad = ((SmedAction.panelMain.mark.getRadar() != Rtb.NORTB) && (SmedAction.panelMain.mark.getRadar() != Rtb.REFLECTOR));
    207207                groupLabel.setVisible(rad);
    208208                groupBox.setVisible(rad);
     
    219219                sectorsLabel.setVisible(rad);
    220220                for (Rtb rtb : rads.keySet()) {
    221                         rads.get(rtb).setBorderPainted(dlg.panelMain.mark.getRadar() == rtb);
    222                 }
    223                 groupBox.setText(dlg.panelMain.mark.getRaconGroup());
    224                 seqBox.setText(dlg.panelMain.mark.getRaconSequence());
    225                 periodBox.setText(dlg.panelMain.mark.getRaconPeriod());
    226                 rangeBox.setText(dlg.panelMain.mark.getRaconRange());
    227                 sector1Box.setText(dlg.panelMain.mark.getRaconSector1());
    228                 sector2Box.setText(dlg.panelMain.mark.getRaconSector2());
    229                 aisButton.setSelected(dlg.panelMain.mark.getRadio() != Cat.NOROS);
     221                        rads.get(rtb).setBorderPainted(SmedAction.panelMain.mark.getRadar() == rtb);
     222                }
     223                groupBox.setText(SmedAction.panelMain.mark.getRaconGroup());
     224                seqBox.setText(SmedAction.panelMain.mark.getRaconSequence());
     225                periodBox.setText(SmedAction.panelMain.mark.getRaconPeriod());
     226                rangeBox.setText(SmedAction.panelMain.mark.getRaconRange());
     227                sector1Box.setText(SmedAction.panelMain.mark.getRaconSector1());
     228                sector2Box.setText(SmedAction.panelMain.mark.getRaconSector2());
     229                aisButton.setSelected(SmedAction.panelMain.mark.getRadio() != Cat.NOROS);
    230230                aisButton.setBorderPainted(aisButton.isSelected());
    231                 radioCatBox.setVisible(dlg.panelMain.mark.getRadio() != Cat.NOROS);
     231                radioCatBox.setVisible(SmedAction.panelMain.mark.getRadio() != Cat.NOROS);
    232232        }
    233233
  • applications/editors/josm/plugins/smed/src/panels/PanelSaw.java

    r30737 r30738  
    2727                                JRadioButton button = shapes.get(shp);
    2828                                if (button.isSelected()) {
    29                                         dlg.panelMain.mark.setShape(shp);
    30                                         dlg.panelMain.mark.setObject(objects.get(shp));
     29                                        SmedAction.panelMain.mark.setShape(shp);
     30                                        SmedAction.panelMain.mark.setObject(objects.get(shp));
    3131                                        button.setBorderPainted(true);
    3232                                } else
    3333                                        button.setBorderPainted(false);
    3434                        }
    35                         if (dlg.panelMain.mark.testValid()) {
    36                                 dlg.panelMain.panelChan.topmarkButton.setVisible(true);
    37                                 dlg.panelMain.mark.setObjPattern(Pat.VSTRP);
    38                                 dlg.panelMain.mark.setObjColour(Col.RED);
    39                                 dlg.panelMain.mark.addObjColour(Col.WHITE);
     35                        if (SmedAction.panelMain.mark.testValid()) {
     36                                SmedAction.panelMain.panelChan.topmarkButton.setVisible(true);
     37                                SmedAction.panelMain.mark.setObjPattern(Pat.VSTRP);
     38                                SmedAction.panelMain.mark.setObjColour(Col.RED);
     39                                SmedAction.panelMain.mark.addObjColour(Col.WHITE);
    4040                        } else {
    41                                 dlg.panelMain.panelChan.topmarkButton.setVisible(false);
     41                                SmedAction.panelMain.panelChan.topmarkButton.setVisible(false);
    4242                        }
    43                         dlg.panelMain.panelMore.syncPanel();
     43                        SmedAction.panelMain.panelMore.syncPanel();
    4444                }
    4545        };
     
    5858                for (Shp shp : shapes.keySet()) {
    5959                        JRadioButton button = shapes.get(shp);
    60                         if (dlg.panelMain.mark.getShape() == shp) {
     60                        if (SmedAction.panelMain.mark.getShape() == shp) {
    6161                                button.setBorderPainted(true);
    6262                        } else
    6363                                button.setBorderPainted(false);
    6464                }
    65                 dlg.panelMain.mark.testValid();
     65                SmedAction.panelMain.mark.testValid();
    6666        }
    6767       
  • applications/editors/josm/plugins/smed/src/panels/PanelSectors.java

    r30737 r30738  
    123123
    124124                public int getRowCount() {
    125                         if (dlg.panelMain == null)
     125                        if (SmedAction.panelMain == null)
    126126                                return 1;
    127127                        else
    128                                 return dlg.panelMain.mark.getSectorCount();
     128                                return SmedAction.panelMain.mark.getSectorCount();
    129129                }
    130130
     
    152152                                        return row;
    153153                        case 1:
    154                                 if (((String)dlg.panelMain.mark.getLightAtt(Att.CHR, row)).contains("Al")) {
    155                                         if (dlg.panelMain.mark.getLightAtt(Att.COL, row) == Col.UNKCOL) {
     154                                if (((String)SmedAction.panelMain.mark.getLightAtt(Att.CHR, row)).contains("Al")) {
     155                                        if (SmedAction.panelMain.mark.getLightAtt(Att.COL, row) == Col.UNKCOL) {
    156156                                                return Col.UNKCOL;
    157157                                        } else {
    158                                                 return dlg.panelMain.mark.getLightAtt(Att.ALT, row);
     158                                                return SmedAction.panelMain.mark.getLightAtt(Att.ALT, row);
    159159                                        }
    160160                                } else {
    161                                         return dlg.panelMain.mark.getLightAtt(Att.COL, row);
     161                                        return SmedAction.panelMain.mark.getLightAtt(Att.COL, row);
    162162                                }
    163163                        case 6:
    164                                 return (dlg.panelMain.mark.getLightAtt(Att.LIT, row) == Lit.DIR);
     164                                return (SmedAction.panelMain.mark.getLightAtt(Att.LIT, row) == Lit.DIR);
    165165                        case 7:
    166166                        case 8:
    167                                 if (dlg.panelMain.mark.getLightAtt(Att.LIT, row) == Lit.DIR)
    168                                         return dlg.panelMain.mark.getLightAtt(Att.ORT, row);
     167                                if (SmedAction.panelMain.mark.getLightAtt(Att.LIT, row) == Lit.DIR)
     168                                        return SmedAction.panelMain.mark.getLightAtt(Att.ORT, row);
    169169                                else
    170                                         return dlg.panelMain.mark.getLightAtt(col - 1, row);
     170                                        return SmedAction.panelMain.mark.getLightAtt(col - 1, row);
    171171                        case 12:
    172                                 return visibilities.get(dlg.panelMain.mark.getLightAtt(Att.VIS, row));
     172                                return visibilities.get(SmedAction.panelMain.mark.getLightAtt(Att.VIS, row));
    173173                        case 13:
    174                                 return exhibitions.get(dlg.panelMain.mark.getLightAtt(Att.EXH, row));
     174                                return exhibitions.get(SmedAction.panelMain.mark.getLightAtt(Att.EXH, row));
    175175                        default:
    176                                 return dlg.panelMain.mark.getLightAtt(col - 1, row);
     176                                return SmedAction.panelMain.mark.getLightAtt(col - 1, row);
    177177                        }
    178178                }
     
    184184                                        ImageIcon img = colours.get(colour);
    185185                                        if (img == value)
    186                                                 if (((String)dlg.panelMain.mark.getLightAtt(Att.CHR, row)).contains("Al")) {
    187                                                         if (((colour == Col.UNKCOL) && (dlg.panelMain.mark.getLightAtt(Att.ALT, row) == Col.UNKCOL))
    188                                                                         || (dlg.panelMain.mark.getLightAtt(Att.COL, row) == Col.UNKCOL)) {
    189                                                                 dlg.panelMain.mark.setLightAtt(Att.COL, row, colour);
     186                                                if (((String)SmedAction.panelMain.mark.getLightAtt(Att.CHR, row)).contains("Al")) {
     187                                                        if (((colour == Col.UNKCOL) && (SmedAction.panelMain.mark.getLightAtt(Att.ALT, row) == Col.UNKCOL))
     188                                                                        || (SmedAction.panelMain.mark.getLightAtt(Att.COL, row) == Col.UNKCOL)) {
     189                                                                SmedAction.panelMain.mark.setLightAtt(Att.COL, row, colour);
    190190                                                        } else {
    191                                                                 dlg.panelMain.mark.setLightAtt(Att.ALT, row, colour);
     191                                                                SmedAction.panelMain.mark.setLightAtt(Att.ALT, row, colour);
    192192                                                        }
    193193                                                } else {
    194                                                         dlg.panelMain.mark.setLightAtt(Att.COL, row, colour);
     194                                                        SmedAction.panelMain.mark.setLightAtt(Att.COL, row, colour);
    195195                                                }
    196196                                }
     
    200200                        case 10:
    201201                        case 11:
    202                                 dlg.panelMain.mark.setLightAtt(col - 1, row, value);
     202                                SmedAction.panelMain.mark.setLightAtt(col - 1, row, value);
    203203                                break;
    204204                        case 6:
    205205                                if ((Boolean) value == true) {
    206                                         dlg.panelMain.mark.setLightAtt(Att.LIT, row, Lit.DIR);
    207                                         dlg.panelMain.mark.setLightAtt(Att.BEG, row, "");
    208                                         dlg.panelMain.mark.setLightAtt(Att.END, row, "");
     206                                        SmedAction.panelMain.mark.setLightAtt(Att.LIT, row, Lit.DIR);
     207                                        SmedAction.panelMain.mark.setLightAtt(Att.BEG, row, "");
     208                                        SmedAction.panelMain.mark.setLightAtt(Att.END, row, "");
    209209                                } else {
    210                                         dlg.panelMain.mark.setLightAtt(Att.LIT, row, Lit.UNKLIT);
    211                                         dlg.panelMain.mark.setLightAtt(Att.ORT, row, "");
     210                                        SmedAction.panelMain.mark.setLightAtt(Att.LIT, row, Lit.UNKLIT);
     211                                        SmedAction.panelMain.mark.setLightAtt(Att.ORT, row, "");
    212212                                }
    213213                                break;
    214214                        case 7:
    215215                        case 8:
    216                                 if (dlg.panelMain.mark.getLightAtt(Att.LIT, row) == Lit.DIR) {
    217                                         dlg.panelMain.mark.setLightAtt(Att.ORT, row, value);
     216                                if (SmedAction.panelMain.mark.getLightAtt(Att.LIT, row) == Lit.DIR) {
     217                                        SmedAction.panelMain.mark.setLightAtt(Att.ORT, row, value);
    218218                                } else {
    219                                         dlg.panelMain.mark.setLightAtt(col - 1, row, value);
     219                                        SmedAction.panelMain.mark.setLightAtt(col - 1, row, value);
    220220                                }
    221221                                break;
     
    224224                                        String str = visibilities.get(vis);
    225225                                        if (str.equals(value))
    226                                                 dlg.panelMain.mark.setLightAtt(Att.VIS, row, vis);
     226                                                SmedAction.panelMain.mark.setLightAtt(Att.VIS, row, vis);
    227227                                }
    228228                                break;
     
    231231                                        String str = exhibitions.get(exh);
    232232                                        if (str.equals(value))
    233                                                 dlg.panelMain.mark.setLightAtt(Att.EXH, row, exh);
     233                                                SmedAction.panelMain.mark.setLightAtt(Att.EXH, row, exh);
    234234                                }
    235235                                break;
    236236                        default:
    237                                 dlg.panelMain.mark.setLightAtt(col - 1, row, value);
     237                                SmedAction.panelMain.mark.setLightAtt(col - 1, row, value);
    238238                        }
    239239                }
     
    261261                }
    262262                public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int rowIndex, int vColIndex) {
    263                         if (!((String)dlg.panelMain.mark.getLightAtt(Att.CHR, rowIndex)).contains("Al")) {
    264                                 col2Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.COL, rowIndex)));
     263                        if (!((String)SmedAction.panelMain.mark.getLightAtt(Att.CHR, rowIndex)).contains("Al")) {
     264                                col2Label.setBackground(SeaMark.ColMAP.get(SmedAction.panelMain.mark.getLightAtt(Att.COL, rowIndex)));
    265265                        } else {
    266                                 col2Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.ALT, rowIndex)));
    267                         }
    268                         col1Label.setBackground(SeaMark.ColMAP.get(dlg.panelMain.mark.getLightAtt(Att.COL, rowIndex)));
     266                                col2Label.setBackground(SeaMark.ColMAP.get(SmedAction.panelMain.mark.getLightAtt(Att.ALT, rowIndex)));
     267                        }
     268                        col1Label.setBackground(SeaMark.ColMAP.get(SmedAction.panelMain.mark.getLightAtt(Att.COL, rowIndex)));
    269269                        return this;
    270270                }
     
    276276
    277277        public void addSector(int idx) {
    278                 dlg.panelMain.mark.addLight(idx);
     278                SmedAction.panelMain.mark.addLight(idx);
    279279                table.setSize(860, ((table.getRowCount() * 16) + 28));
    280280                if (table.getRowCount() > 3) {
     
    287287        public void deleteSector(int idx) {
    288288                if (idx > 0) {
    289                         dlg.panelMain.mark.delLight(idx);
     289                        SmedAction.panelMain.mark.delLight(idx);
    290290                        table.setSize(860, ((table.getRowCount() * 16) + 28));
    291291                        if (table.getRowCount() > 3) {
  • applications/editors/josm/plugins/smed/src/panels/PanelSpec.java

    r30737 r30738  
    2424                                int idx = categories.get(cat);
    2525                                if (dlg.node != null && (idx == categoryBox.getSelectedIndex()))
    26                                         dlg.panelMain.mark.setCategory(cat);
     26                                        SmedAction.panelMain.mark.setCategory(cat);
    2727                        }
    2828                }
     
    3535                                int idx = moorings.get(cat);
    3636                                if (dlg.node != null && (idx == mooringBox.getSelectedIndex())) {
    37                                         dlg.panelMain.mark.setCategory(cat);
     37                                        SmedAction.panelMain.mark.setCategory(cat);
    3838                                        if ((cat == Cat.INB_CALM) || (cat == Cat.INB_SBM)) {
    39                                                 dlg.panelMain.mark.setObject(Obj.BOYINB);
    40                                                 dlg.panelMain.mark.setShape(Shp.UNKSHP);
     39                                                SmedAction.panelMain.mark.setObject(Obj.BOYINB);
     40                                                SmedAction.panelMain.mark.setShape(Shp.UNKSHP);
    4141                                        } else {
    42                                                 dlg.panelMain.mark.setObject(Obj.MORFAC);
     42                                                SmedAction.panelMain.mark.setObject(Obj.MORFAC);
    4343                                                if (cat != Cat.MOR_BUOY)
    44                                                         dlg.panelMain.mark.setShape(Shp.UNKSHP);
     44                                                        SmedAction.panelMain.mark.setShape(Shp.UNKSHP);
    4545                                        }
    4646                                }
     
    6666        public ActionListener alShape = new ActionListener() {
    6767                public void actionPerformed(java.awt.event.ActionEvent e) {
    68                         if ((dlg.panelMain.mark.getObject() != Obj.MORFAC) || (dlg.panelMain.mark.getCategory() == Cat.MOR_BUOY)) {
     68                        if ((SmedAction.panelMain.mark.getObject() != Obj.MORFAC) || (SmedAction.panelMain.mark.getCategory() == Cat.MOR_BUOY)) {
    6969                                for (Shp shp : shapes.keySet()) {
    7070                                        JRadioButton button = shapes.get(shp);
    7171                                        if (button.isSelected()) {
    72                                                 dlg.panelMain.mark.setShape(shp);
    73                                                 if (SeaMark.EntMAP.get(dlg.panelMain.mark.getObject()) != Ent.MOORING) {
    74                                                         dlg.panelMain.mark.setObject(objects.get(shp));
    75                                                         if (dlg.panelMain.mark.getObjColour(0) == Col.UNKCOL) {
    76                                                                 dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    77                                                                 dlg.panelMain.mark.setObjColour(Col.YELLOW);
     72                                                SmedAction.panelMain.mark.setShape(shp);
     73                                                if (SeaMark.EntMAP.get(SmedAction.panelMain.mark.getObject()) != Ent.MOORING) {
     74                                                        SmedAction.panelMain.mark.setObject(objects.get(shp));
     75                                                        if (SmedAction.panelMain.mark.getObjColour(0) == Col.UNKCOL) {
     76                                                                SmedAction.panelMain.mark.setObjPattern(Pat.NOPAT);
     77                                                                SmedAction.panelMain.mark.setObjColour(Col.YELLOW);
    7878                                                        }
    7979                                                        if (button == cairnButton) {
    80                                                                 dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    81                                                                 dlg.panelMain.mark.setObjColour(Col.UNKCOL);
     80                                                                SmedAction.panelMain.mark.setObjPattern(Pat.NOPAT);
     81                                                                SmedAction.panelMain.mark.setObjColour(Col.UNKCOL);
    8282                                                        }
    83                                                         topmarkButton.setVisible(dlg.panelMain.mark.testValid());
     83                                                        topmarkButton.setVisible(SmedAction.panelMain.mark.testValid());
    8484                                                }
    8585                                                button.setBorderPainted(true);
     
    8787                                                button.setBorderPainted(false);
    8888                                }
    89                                 dlg.panelMain.panelMore.syncPanel();
     89                                SmedAction.panelMain.panelMore.syncPanel();
    9090                        }
    9191                }
     
    9595                public void actionPerformed(java.awt.event.ActionEvent e) {
    9696                        if (topmarkButton.isSelected()) {
    97                                 dlg.panelMain.mark.setTopmark(Top.X_SHAPE);
    98                                 dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
    99                                 dlg.panelMain.mark.setTopColour(Col.YELLOW);
     97                                SmedAction.panelMain.mark.setTopmark(Top.X_SHAPE);
     98                                SmedAction.panelMain.mark.setTopPattern(Pat.NOPAT);
     99                                SmedAction.panelMain.mark.setTopColour(Col.YELLOW);
    100100                                topmarkButton.setBorderPainted(true);
    101101                        } else {
    102                                 dlg.panelMain.mark.setTopmark(Top.NOTOP);
    103                                 dlg.panelMain.mark.setTopPattern(Pat.NOPAT);
    104                                 dlg.panelMain.mark.setTopColour(Col.UNKCOL);
     102                                SmedAction.panelMain.mark.setTopmark(Top.NOTOP);
     103                                SmedAction.panelMain.mark.setTopPattern(Pat.NOPAT);
     104                                SmedAction.panelMain.mark.setTopColour(Col.UNKCOL);
    105105                                topmarkButton.setBorderPainted(false);
    106106                        }
    107                         dlg.panelMain.panelTop.syncPanel();
     107                        SmedAction.panelMain.panelTop.syncPanel();
    108108                }
    109109        };
     
    111111        private ActionListener alNotice = new ActionListener() {
    112112                public void actionPerformed(java.awt.event.ActionEvent e) {
    113                         dlg.panelMain.mark.clrMark();
     113                        SmedAction.panelMain.mark.clrMark();
    114114                        if (noticeButton.isSelected()) {
    115                                 dlg.panelMain.mark.setObject(Obj.NOTMRK);
     115                                SmedAction.panelMain.mark.setObject(Obj.NOTMRK);
    116116                                noticeButton.setBorderPainted(true);
    117117                        } else {
    118                                 dlg.panelMain.mark.setObject(Obj.UNKOBJ);
     118                                SmedAction.panelMain.mark.setObject(Obj.UNKOBJ);
    119119                                noticeButton.setBorderPainted(false);
    120120                        }
    121                         dlg.panelMain.syncPanel();
     121                        SmedAction.panelMain.syncPanel();
    122122                }
    123123        };
     
    125125        private ActionListener alMooring = new ActionListener() {
    126126                public void actionPerformed(java.awt.event.ActionEvent e) {
    127                         dlg.panelMain.mark.setObject(Obj.UNKOBJ);
    128                         dlg.panelMain.mark.setCategory(Cat.NOCAT);
    129                         dlg.panelMain.mark.setTopmark(Top.NOTOP);
     127                        SmedAction.panelMain.mark.setObject(Obj.UNKOBJ);
     128                        SmedAction.panelMain.mark.setCategory(Cat.NOCAT);
     129                        SmedAction.panelMain.mark.setTopmark(Top.NOTOP);
    130130                        if (mooringButton.isSelected()) {
    131                                 dlg.panelMain.mark.setObject(Obj.MORFAC);
     131                                SmedAction.panelMain.mark.setObject(Obj.MORFAC);
    132132                                categoryBox.setVisible(false);
    133133                                mooringBox.setVisible(true);
     
    234234
    235235        public void syncPanel() {
    236                 if (SeaMark.EntMAP.get(dlg.panelMain.mark.getObject()) == Ent.MOORING) {
     236                if (SeaMark.EntMAP.get(SmedAction.panelMain.mark.getObject()) == Ent.MOORING) {
    237237                        mooringButton.setBorderPainted(true);
    238238                        categoryBox.setVisible(false);
     
    248248                        for (Cat cat : moorings.keySet()) {
    249249                                int item = moorings.get(cat);
    250                                 if (dlg.panelMain.mark.getCategory() == cat)
     250                                if (SmedAction.panelMain.mark.getCategory() == cat)
    251251                                        mooringBox.setSelectedIndex(item);
    252252                        }
     
    262262                        cairnButton.setEnabled(true);
    263263                        noticeButton.setEnabled(true);
    264                         topmarkButton.setBorderPainted(dlg.panelMain.mark.getTopmark() != Top.NOTOP);
    265                         topmarkButton.setSelected(dlg.panelMain.mark.getTopmark() != Top.NOTOP);
    266                         topmarkButton.setVisible(dlg.panelMain.mark.testValid());
     264                        topmarkButton.setBorderPainted(SmedAction.panelMain.mark.getTopmark() != Top.NOTOP);
     265                        topmarkButton.setSelected(SmedAction.panelMain.mark.getTopmark() != Top.NOTOP);
     266                        topmarkButton.setVisible(SmedAction.panelMain.mark.testValid());
    267267                        for (Cat cat : categories.keySet()) {
    268268                                int item = categories.get(cat);
    269                                 if (dlg.panelMain.mark.getCategory() == cat)
     269                                if (SmedAction.panelMain.mark.getCategory() == cat)
    270270                                        categoryBox.setSelectedIndex(item);
    271271                        }
     
    273273                for (Shp shp : shapes.keySet()) {
    274274                        JRadioButton button = shapes.get(shp);
    275                         if (dlg.panelMain.mark.getShape() == shp) {
     275                        if (SmedAction.panelMain.mark.getShape() == shp) {
    276276                                button.setBorderPainted(true);
    277277                        } else
     
    279279                }
    280280                noticeButton.setBorderPainted(false);
    281                 dlg.panelMain.mark.testValid();
     281                SmedAction.panelMain.mark.testValid();
    282282        }
    283283
  • applications/editors/josm/plugins/smed/src/panels/PanelStbd.java

    r30737 r30738  
    3131                                JRadioButton button = shapes.get(shp);
    3232                                if (button.isSelected()) {
    33                                         dlg.panelMain.mark.setShape(shp);
    34                                         dlg.panelMain.mark.setObject(objects.get(shp));
     33                                        SmedAction.panelMain.mark.setShape(shp);
     34                                        SmedAction.panelMain.mark.setObject(objects.get(shp));
    3535                                        button.setBorderPainted(true);
    3636                                } else
    3737                                        button.setBorderPainted(false);
    3838                        }
    39                         if (dlg.panelMain.mark.testValid()) {
    40                                 dlg.panelMain.panelChan.topmarkButton.setVisible(true);
    41                                 dlg.panelMain.panelChan.lightButton.setVisible(true);
    42                                 if (dlg.panelMain.mark.getCategory() == Cat.LAM_STBD) {
    43                                         switch (dlg.panelMain.mark.getRegion()) {
     39                        if (SmedAction.panelMain.mark.testValid()) {
     40                                SmedAction.panelMain.panelChan.topmarkButton.setVisible(true);
     41                                SmedAction.panelMain.panelChan.lightButton.setVisible(true);
     42                                if (SmedAction.panelMain.mark.getCategory() == Cat.LAM_STBD) {
     43                                        switch (SmedAction.panelMain.mark.getRegion()) {
    4444                                        case A:
    45                                                 dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    46                                                 dlg.panelMain.mark.setObjColour(Col.GREEN);
     45                                                SmedAction.panelMain.mark.setObjPattern(Pat.NOPAT);
     46                                                SmedAction.panelMain.mark.setObjColour(Col.GREEN);
    4747                                                break;
    4848                                        case B:
    49                                                 dlg.panelMain.mark.setObjPattern(Pat.NOPAT);
    50                                                 dlg.panelMain.mark.setObjColour(Col.RED);
     49                                                SmedAction.panelMain.mark.setObjPattern(Pat.NOPAT);
     50                                                SmedAction.panelMain.mark.setObjColour(Col.RED);
    5151                                                break;
    5252                                        case C:
    53                                                 dlg.panelMain.mark.setObjPattern(Pat.HSTRP);
    54                                                 dlg.panelMain.mark.setObjColour(Col.GREEN);
    55                                                 dlg.panelMain.mark.addObjColour(Col.WHITE);
    56                                                 dlg.panelMain.mark.addObjColour(Col.GREEN);
    57                                                 dlg.panelMain.mark.addObjColour(Col.WHITE);
     53                                                SmedAction.panelMain.mark.setObjPattern(Pat.HSTRP);
     54                                                SmedAction.panelMain.mark.setObjColour(Col.GREEN);
     55                                                SmedAction.panelMain.mark.addObjColour(Col.WHITE);
     56                                                SmedAction.panelMain.mark.addObjColour(Col.GREEN);
     57                                                SmedAction.panelMain.mark.addObjColour(Col.WHITE);
    5858                                                break;
    5959                                        }
    6060                                } else {
    61                                         dlg.panelMain.mark.setObjPattern(Pat.HSTRP);
    62                                         switch (dlg.panelMain.mark.getRegion()) {
     61                                        SmedAction.panelMain.mark.setObjPattern(Pat.HSTRP);
     62                                        switch (SmedAction.panelMain.mark.getRegion()) {
    6363                                        case A:
    64                                                 dlg.panelMain.mark.setObjColour(Col.GREEN);
    65                                                 dlg.panelMain.mark.addObjColour(Col.RED);
    66                                                 dlg.panelMain.mark.addObjColour(Col.GREEN);
     64                                                SmedAction.panelMain.mark.setObjColour(Col.GREEN);
     65                                                SmedAction.panelMain.mark.addObjColour(Col.RED);
     66                                                SmedAction.panelMain.mark.addObjColour(Col.GREEN);
    6767                                                break;
    6868                                        case B:
    69                                                 dlg.panelMain.mark.setObjColour(Col.RED);
    70                                                 dlg.panelMain.mark.addObjColour(Col.GREEN);
    71                                                 dlg.panelMain.mark.addObjColour(Col.RED);
     69                                                SmedAction.panelMain.mark.setObjColour(Col.RED);
     70                                                SmedAction.panelMain.mark.addObjColour(Col.GREEN);
     71                                                SmedAction.panelMain.mark.addObjColour(Col.RED);
    7272                                                break;
    7373                                        case C:
    74                                                 dlg.panelMain.mark.setObjColour(Col.RED);
    75                                                 dlg.panelMain.mark.addObjColour(Col.GREEN);
    76                                                 dlg.panelMain.mark.addObjColour(Col.RED);
    77                                                 dlg.panelMain.mark.addObjColour(Col.GREEN);
     74                                                SmedAction.panelMain.mark.setObjColour(Col.RED);
     75                                                SmedAction.panelMain.mark.addObjColour(Col.GREEN);
     76                                                SmedAction.panelMain.mark.addObjColour(Col.RED);
     77                                                SmedAction.panelMain.mark.addObjColour(Col.GREEN);
    7878                                                break;
    7979                                        }
    8080                                }
    81                                 dlg.panelMain.panelMore.syncPanel();
     81                                SmedAction.panelMain.panelMore.syncPanel();
    8282                        } else {
    83                                 dlg.panelMain.panelChan.topmarkButton.setVisible(false);
    84                                 dlg.panelMain.panelChan.lightButton.setVisible(false);
     83                                SmedAction.panelMain.panelChan.topmarkButton.setVisible(false);
     84                                SmedAction.panelMain.panelChan.lightButton.setVisible(false);
    8585                        }
    8686                }
     
    104104                for (Shp shp : shapes.keySet()) {
    105105                        JRadioButton button = shapes.get(shp);
    106                         if (dlg.panelMain.mark.getShape() == shp) {
     106                        if (SmedAction.panelMain.mark.getShape() == shp) {
    107107                                button.setBorderPainted(true);
    108108                        } else
  • applications/editors/josm/plugins/smed/src/panels/PanelTop.java

    r30737 r30738  
    3838                                JRadioButton button = tops.get(top);
    3939                                if (button.isSelected()) {
    40                                         dlg.panelMain.mark.setTopmark(top);
     40                                        SmedAction.panelMain.mark.setTopmark(top);
    4141                                        button.setBorderPainted(true);
    4242                                } else
     
    7979                for (Top top : tops.keySet()) {
    8080                        JRadioButton button = tops.get(top);
    81                         if (dlg.panelMain.mark.getTopmark() == top) {
     81                        if (SmedAction.panelMain.mark.getTopmark() == top) {
    8282                                button.setBorderPainted(true);
    8383                        } else
  • applications/editors/josm/plugins/smed/src/seamarks/SeaMark.java

    r30737 r30738  
    13611361                }
    13621362                if (tmp) {
    1363                         dlg.panelMain.moreButton.setVisible(true);
    1364                         dlg.panelMain.saveButton.setEnabled(true);
    1365                         dlg.panelMain.topButton.setEnabled(true);
    1366                         dlg.panelMain.fogButton.setEnabled(true);
    1367                         dlg.panelMain.radButton.setEnabled(true);
    1368                         dlg.panelMain.litButton.setEnabled(true);
     1363                        SmedAction.panelMain.moreButton.setVisible(true);
     1364                        SmedAction.panelMain.saveButton.setEnabled(true);
     1365                        SmedAction.panelMain.topButton.setEnabled(true);
     1366                        SmedAction.panelMain.fogButton.setEnabled(true);
     1367                        SmedAction.panelMain.radButton.setEnabled(true);
     1368                        SmedAction.panelMain.litButton.setEnabled(true);
    13691369                        return true;
    13701370                } else {
    1371                         dlg.panelMain.moreButton.setVisible(false);
    1372                         dlg.panelMain.moreButton.setText(">>");
    1373                         dlg.panelMain.topButton.setEnabled(false);
    1374                         dlg.panelMain.fogButton.setEnabled(false);
    1375                         dlg.panelMain.radButton.setEnabled(false);
    1376                         dlg.panelMain.litButton.setEnabled(false);
     1371                        SmedAction.panelMain.moreButton.setVisible(false);
     1372                        SmedAction.panelMain.moreButton.setText(">>");
     1373                        SmedAction.panelMain.topButton.setEnabled(false);
     1374                        SmedAction.panelMain.fogButton.setEnabled(false);
     1375                        SmedAction.panelMain.radButton.setEnabled(false);
     1376                        SmedAction.panelMain.litButton.setEnabled(false);
    13771377                        PanelMain.messageBar.setText("Seamark not recognised");
    13781378                        return false;
     
    13981398                setSource("");
    13991399                setFixme("");
    1400                 dlg.panelMain.syncPanel();
     1400                SmedAction.panelMain.syncPanel();
    14011401                repaint();
    14021402        }
Note: See TracChangeset for help on using the changeset viewer.