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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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);
Note: See TracChangeset for help on using the changeset viewer.