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

[josm_plugins] fix compilation warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/editgpx/src/org/openstreetmap/josm/plugins/editgpx/GPXLayerImportAction.java

    r28204 r30532  
    3737class GPXLayerImportAction extends AbstractAction {
    3838
    39 
    40     private static final long serialVersionUID = 5794897888911798168L;
    4139    private EditGpxData data;
    4240    public Object importing = new Object(); //used for synchronization
     
    5452    public void activateImport() {
    5553        Box panel = Box.createVerticalBox();
    56         DefaultListModel dModel= new DefaultListModel();
     54        DefaultListModel<GpxLayer> dModel = new DefaultListModel<>();
    5755
    58         final JList layerList = new JList(dModel);
     56        final JList<GpxLayer> layerList = new JList<>(dModel);
    5957        Collection<Layer> data = Main.map.mapView.getAllLayers();
    6058        int layerCnt = 0;
     
    6260        for (Layer l : data){
    6361            if(l instanceof GpxLayer){
    64                 dModel.addElement(l);
     62                dModel.addElement((GpxLayer) l);
    6563                layerCnt++;
    6664            }
     
    6967            layerList.setSelectionInterval(0, layerCnt-1);
    7068            layerList.setCellRenderer(new DefaultListCellRenderer(){
    71                 @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
     69                @Override public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
    7270                    Layer layer = (Layer)value;
    7371                    JLabel label = (JLabel)super.getListCellRendererComponent(list,
     
    104102            }
    105103            synchronized(importing) {
    106                 for (Object o : layerList.getSelectedValues()) {
    107                     GpxLayer gpx = (GpxLayer )o;
     104                for (GpxLayer gpx : layerList.getSelectedValuesList()) {
    108105                    this.data.load(gpx.data);
    109106                }
Note: See TracChangeset for help on using the changeset viewer.