Ignore:
Timestamp:
2014-10-19T01:27:04+02:00 (11 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/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:
Note: See TracChangeset for help on using the changeset viewer.