Changeset 30532 in osm for applications/editors/josm/plugins/measurement/src/org/openstreetmap
- Timestamp:
- 2014-07-14T04:18:06+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/measurement/src/org/openstreetmap/josm/plugins/measurement/MeasurementLayer.java
r30353 r30532 41 41 import org.openstreetmap.josm.tools.ImageProvider; 42 42 43 44 43 /** 45 44 * This is a layer that draws a grid … … 206 205 } 207 206 208 209 207 private class GPXLayerImportAction extends AbstractAction { 210 208 … … 212 210 * The data model for the list component. 213 211 */ 214 private DefaultListModel model = new DefaultListModel(); 212 private DefaultListModel<GpxLayer> model = new DefaultListModel<>(); 215 213 216 214 /** … … 224 222 public void actionPerformed(ActionEvent e) { 225 223 Box panel = Box.createVerticalBox(); 226 final JList layerList = new JList(model); 224 final JList<GpxLayer> layerList = new JList<>(model); 227 225 Collection<Layer> data = Main.map.mapView.getAllLayers(); 228 226 Layer lastLayer = null; … … 231 229 for (Layer l : data){ 232 230 if(l instanceof GpxLayer){ 233 model.addElement(l); 231 model.addElement((GpxLayer) l); 234 232 lastLayer = l; 235 233 layerCnt++; … … 242 240 243 241 layerList.setCellRenderer(new DefaultListCellRenderer(){ 244 @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { 242 @Override public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) { 245 243 Layer layer = (Layer)value; 246 244 JLabel label = (JLabel)super.getListCellRendererComponent(list, … … 293 291 } 294 292 } 295 296 293 }
Note:
See TracChangeset
for help on using the changeset viewer.