Ignore:
Timestamp:
2014-07-14T04:18:06+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plugins] fix compilation warnings

Location:
applications/editors/josm/plugins/smed/src/panels
Files:
6 edited

Legend:

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

    r29894 r30532  
    1818        public JLabel categoryLabel;
    1919
    20         public JComboBox landCatBox;
     20        public JComboBox<String> landCatBox;
    2121        public EnumMap<Cat, Integer> landCats = new EnumMap<Cat, Integer>(Cat.class);
    2222        private ActionListener alLandCatBox = new ActionListener() {
     
    3131                }
    3232        };
    33         public JComboBox trafficCatBox;
     33        public JComboBox<String> trafficCatBox;
    3434        public EnumMap<Cat, Integer> trafficCats = new EnumMap<Cat, Integer>(Cat.class);
    3535        private ActionListener alTrafficCatBox = new ActionListener() {
     
    4444                }
    4545        };
    46         public JComboBox warningCatBox;
     46        public JComboBox<String> warningCatBox;
    4747        public EnumMap<Cat, Integer> warningCats = new EnumMap<Cat, Integer>(Cat.class);
    4848        private ActionListener alWarningCatBox = new ActionListener() {
     
    5757                }
    5858        };
    59         public JComboBox platformCatBox;
     59        public JComboBox<String> platformCatBox;
    6060        public EnumMap<Cat, Integer> platformCats = new EnumMap<Cat, Integer>(Cat.class);
    6161        private ActionListener alPlatformCatBox = new ActionListener() {
     
    7070                }
    7171        };
    72         public JComboBox pilotCatBox;
     72        public JComboBox<String> pilotCatBox;
    7373        public EnumMap<Cat, Integer> pilotCats = new EnumMap<Cat, Integer>(Cat.class);
    7474        private ActionListener alPilotCatBox = new ActionListener() {
     
    8383                }
    8484        };
    85         public JComboBox rescueCatBox;
     85        public JComboBox<String> rescueCatBox;
    8686        public EnumMap<Cat, Integer> rescueCats = new EnumMap<Cat, Integer>(Cat.class);
    8787        private ActionListener alRescueCatBox = new ActionListener() {
     
    9696                }
    9797        };
    98         public JComboBox radioCatBox;
     98        public JComboBox<String> radioCatBox;
    9999        public EnumMap<Cat, Integer> radioCats = new EnumMap<Cat, Integer>(Cat.class);
    100100        private ActionListener alRadioCatBox = new ActionListener() {
     
    109109                }
    110110        };
    111         public JComboBox radarCatBox;
     111        public JComboBox<String> radarCatBox;
    112112        public EnumMap<Cat, Integer> radarCats = new EnumMap<Cat, Integer>(Cat.class);
    113113        private ActionListener alRadarCatBox = new ActionListener() {
     
    123123        };
    124124        public JLabel functionLabel;
    125         public JComboBox functionBox;
     125        public JComboBox<String> functionBox;
    126126        public EnumMap<Fnc, Integer> functions = new EnumMap<Fnc, Integer>(Fnc.class);
    127127        private ActionListener alfunctionBox = new ActionListener() {
     
    261261                functionLabel.setVisible(false);
    262262
    263                 functionBox = new JComboBox();
     263                functionBox = new JComboBox<>();
    264264                functionBox.setBounds(new Rectangle(5, 110, 160, 18));
    265265                add(functionBox);
     
    281281                categoryLabel.setVisible(false);
    282282
    283                 landCatBox = new JComboBox();
     283                landCatBox = new JComboBox<>();
    284284                landCatBox.setBounds(new Rectangle(5, 142, 160, 18));
    285285                add(landCatBox);
     
    308308                landCatBox.setVisible(false);
    309309
    310                 trafficCatBox = new JComboBox();
     310                trafficCatBox = new JComboBox<>();
    311311                trafficCatBox.setBounds(new Rectangle(5, 140, 160, 20));
    312312                add(trafficCatBox);
     
    325325                trafficCatBox.setVisible(false);
    326326
    327                 warningCatBox = new JComboBox();
     327                warningCatBox = new JComboBox<>();
    328328                warningCatBox.setBounds(new Rectangle(5, 140, 160, 20));
    329329                add(warningCatBox);
     
    347347                warningCatBox.setVisible(false);
    348348
    349                 platformCatBox = new JComboBox();
     349                platformCatBox = new JComboBox<>();
    350350                platformCatBox.setBounds(new Rectangle(5, 140, 160, 20));
    351351                add(platformCatBox);
     
    364364                platformCatBox.setVisible(false);
    365365
    366                 pilotCatBox = new JComboBox();
     366                pilotCatBox = new JComboBox<>();
    367367                pilotCatBox.setBounds(new Rectangle(5, 140, 160, 20));
    368368                add(pilotCatBox);
     
    374374                pilotCatBox.setVisible(false);
    375375
    376                 rescueCatBox = new JComboBox();
     376                rescueCatBox = new JComboBox<>();
    377377                rescueCatBox.setBounds(new Rectangle(5, 140, 160, 20));
    378378                add(rescueCatBox);
     
    391391                rescueCatBox.setVisible(false);
    392392
    393                 radioCatBox = new JComboBox();
     393                radioCatBox = new JComboBox<>();
    394394                radioCatBox.setBounds(new Rectangle(5, 140, 160, 20));
    395395                add(radioCatBox);
     
    429429                radioCatBox.setVisible(false);
    430430
    431                 radarCatBox = new JComboBox();
     431                radarCatBox = new JComboBox<>();
    432432                radarCatBox.setBounds(new Rectangle(5, 140, 160, 20));
    433433                add(radarCatBox);
  • applications/editors/josm/plugins/smed/src/panels/PanelLit.java

    r29894 r30532  
    3939        };
    4040        public JLabel visibilityLabel;
    41         public JComboBox visibilityBox;
     41        public JComboBox<String> visibilityBox;
    4242        public EnumMap<Vis, Integer> visibilities = new EnumMap<Vis, Integer>(Vis.class);
    4343        private ActionListener alVisibility = new ActionListener() {
     
    7979        };
    8080        public JLabel categoryLabel;
    81         public JComboBox categoryBox;
     81        public JComboBox<String> categoryBox;
    8282        public EnumMap<Lit, Integer> categories = new EnumMap<Lit, Integer>(Lit.class);
    8383        private ActionListener alCategory = new ActionListener() {
     
    115115        };
    116116        public JLabel exhibitionLabel;
    117         public JComboBox exhibitionBox;
     117        public JComboBox<String> exhibitionBox;
    118118        public EnumMap<Exh, Integer> exhibitions = new EnumMap<Exh, Integer>(Exh.class);
    119119        private ActionListener alExhibition = new ActionListener() {
     
    209209                categoryLabel.setBounds(new Rectangle(185, 0, 165, 20));
    210210                add(categoryLabel);
    211                 categoryBox = new JComboBox();
     211                categoryBox = new JComboBox<>();
    212212                categoryBox.setBounds(new Rectangle(185, 20, 165, 20));
    213213                add(categoryBox);
     
    235235                visibilityLabel.setBounds(new Rectangle(185, 40, 165, 20));
    236236                add(visibilityLabel);
    237                 visibilityBox = new JComboBox();
     237                visibilityBox = new JComboBox<>();
    238238                visibilityBox.setBounds(new Rectangle(185, 60, 165, 20));
    239239                add(visibilityBox);
     
    247247                exhibitionLabel.setBounds(new Rectangle(280, 80, 70, 20));
    248248                add(exhibitionLabel);
    249                 exhibitionBox = new JComboBox();
     249                exhibitionBox = new JComboBox<>();
    250250                exhibitionBox.setBounds(new Rectangle(280, 100, 70, 20));
    251251                add(exhibitionBox);
  • applications/editors/josm/plugins/smed/src/panels/PanelMore.java

    r29894 r30532  
    4444        };
    4545        public JLabel statusLabel;
    46         public JComboBox statusBox;
     46        public JComboBox<String> statusBox;
    4747        public EnumMap<Sts, Integer> statuses = new EnumMap<Sts, Integer>(Sts.class);
    4848        private ActionListener alStatus = new ActionListener() {
     
    5656        };
    5757        public JLabel constrLabel;
    58         public JComboBox constrBox;
     58        public JComboBox<String> constrBox;
    5959        public EnumMap<Cns, Integer> constructions = new EnumMap<Cns, Integer>(Cns.class);
    6060        private ActionListener alConstr = new ActionListener() {
     
    6868        };
    6969        public JLabel conLabel;
    70         public JComboBox conBox;
     70        public JComboBox<String> conBox;
    7171        public EnumMap<Con, Integer> conspicuities = new EnumMap<Con, Integer>(Con.class);
    7272        private ActionListener alCon = new ActionListener() {
     
    8080        };
    8181        public JLabel reflLabel;
    82         public JComboBox reflBox;
     82        public JComboBox<String> reflBox;
    8383        public EnumMap<Con, Integer> reflectivities = new EnumMap<Con, Integer>(Con.class);
    8484        private ActionListener alRefl = new ActionListener() {
     
    235235                statusLabel.setBounds(new Rectangle(250, 0, 100, 20));
    236236                add(statusLabel);
    237                 statusBox = new JComboBox();
     237                statusBox = new JComboBox<>();
    238238                statusBox.setBounds(new Rectangle(250, 20, 100, 20));
    239239                addStsItem("", Sts.UNKSTS);
     
    262262                constrLabel.setBounds(new Rectangle(250, 40, 100, 20));
    263263                add(constrLabel);
    264                 constrBox = new JComboBox();
     264                constrBox = new JComboBox<>();
    265265                constrBox.setBounds(new Rectangle(250, 60, 100, 20));
    266266                addCnsItem("", Cns.UNKCNS);
     
    280280                conLabel.setBounds(new Rectangle(250, 80, 100, 20));
    281281                add(conLabel);
    282                 conBox = new JComboBox();
     282                conBox = new JComboBox<>();
    283283                conBox.setBounds(new Rectangle(250, 100, 100, 20));
    284284                addConItem("", Con.UNKCON);
     
    291291                reflLabel.setBounds(new Rectangle(250, 120, 100, 20));
    292292                add(reflLabel);
    293                 reflBox = new JComboBox();
     293                reflBox = new JComboBox<>();
    294294                reflBox.setBounds(new Rectangle(250, 140, 100, 20));
    295295                addReflItem("", Con.UNKCON);
     
    361361                return button;
    362362        }
    363 
    364363}
  • applications/editors/josm/plugins/smed/src/panels/PanelRadar.java

    r29894 r30532  
    2828                }
    2929        };
    30         private JComboBox radioCatBox;
     30        private JComboBox<String> radioCatBox;
    3131        private EnumMap<Cat, Integer> radioCats = new EnumMap<Cat, Integer>(Cat.class);
    3232        private ActionListener alRadioCatBox = new ActionListener() {
     
    175175                add(aisButton);
    176176
    177                 radioCatBox = new JComboBox();
     177                radioCatBox = new JComboBox<>();
    178178                radioCatBox.setBounds(new Rectangle(210, 40, 150, 20));
    179179                add(radioCatBox);
  • applications/editors/josm/plugins/smed/src/panels/PanelSectors.java

    r29894 r30532  
    3636                }
    3737        };
    38         public JComboBox colourBox;
     38        public JComboBox<ImageIcon> colourBox;
    3939        public EnumMap<Col, ImageIcon> colours = new EnumMap<Col, ImageIcon>(Col.class);
    40         public JComboBox visibilityBox;
     40        public JComboBox<String> visibilityBox;
    4141        public EnumMap<Vis, String> visibilities = new EnumMap<Vis, String>(Vis.class);
    42         public JComboBox exhibitionBox;
     42        public JComboBox<String> exhibitionBox;
    4343        public EnumMap<Exh, String> exhibitions = new EnumMap<Exh, String>(Exh.class);
    4444
     
    7474
    7575                TableColumn colColumn = table.getColumnModel().getColumn(1);
    76                 colourBox = new JComboBox();
     76                colourBox = new JComboBox<>();
    7777                addColItem(new ImageIcon(getClass().getResource("/images/DelButton.png")), Col.UNKCOL);
    7878                addColItem(new ImageIcon(getClass().getResource("/images/WhiteButton.png")), Col.WHITE);
     
    8787               
    8888                TableColumn visColumn = table.getColumnModel().getColumn(12);
    89                 visibilityBox = new JComboBox();
     89                visibilityBox = new JComboBox<>();
    9090                addVisibItem("", Vis.UNKVIS);
    9191                addVisibItem(Messages.getString("Intensified"), Vis.INTEN);
     
    9595               
    9696                TableColumn exhColumn = table.getColumnModel().getColumn(13);
    97                 exhibitionBox = new JComboBox();
     97                exhibitionBox = new JComboBox<>();
    9898                addExhibItem("", Exh.UNKEXH);
    9999                addExhibItem(Messages.getString("24h"), Exh.H24);
  • applications/editors/josm/plugins/smed/src/panels/PanelSpec.java

    r30294 r30532  
    1717        private SmedAction dlg;
    1818        public JLabel categoryLabel;
    19         public JComboBox categoryBox;
     19        public JComboBox<String> categoryBox;
    2020        public EnumMap<Cat, Integer> categories = new EnumMap<Cat, Integer>(Cat.class);
    2121        private ActionListener alCategoryBox = new ActionListener() {
     
    2828                }
    2929        };
    30         public JComboBox mooringBox;
     30        public JComboBox<String> mooringBox;
    3131        public EnumMap<Cat, Integer> moorings = new EnumMap<Cat, Integer>(Cat.class);
    3232        private ActionListener alMooringBox = new ActionListener() {
     
    173173                categoryLabel.setBounds(new Rectangle(5, 125, 160, 18));
    174174                add(categoryLabel);
    175                 categoryBox = new JComboBox();
     175                categoryBox = new JComboBox<>();
    176176                categoryBox.setBounds(new Rectangle(5, 142, 160, 18));
    177177                add(categoryBox);
     
    196196                addCatItem(Messages.getString("FerryCross"), Cat.SPM_FRRY);
    197197                addCatItem(Messages.getString("Anchorage"), Cat.SPM_ANCH);
    198                 mooringBox = new JComboBox();
     198                mooringBox = new JComboBox<>();
    199199                mooringBox.setBounds(new Rectangle(5, 142, 160, 18));
    200200                add(mooringBox);
Note: See TracChangeset for help on using the changeset viewer.