Changeset 26168 in osm for applications/editors/josm/plugins/public_transport/src/public_transport/StopImporterAction.java
- Timestamp:
- 2011-06-23T17:50:32+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/public_transport/src/public_transport/StopImporterAction.java
r26147 r26168 1 1 package public_transport; 2 2 3 import static org.openstreetmap.josm.tools.I18n.marktr;4 3 import static org.openstreetmap.josm.tools.I18n.tr; 5 4 … … 117 116 } 118 117 JFileChooser fc = new JFileChooser(new File(curDir)); 119 fc.setDialogTitle( "Select GPX file");118 fc.setDialogTitle(tr("Select GPX file")); 120 119 fc.setMultiSelectionEnabled(false); 121 120 … … 265 264 { 266 265 JOptionPane.showMessageDialog 267 (null, "The GPX file contained no tracks or waypoints.", "No data found",266 (null, tr("The GPX file contained no tracks or waypoints."), tr("No data found"), 268 267 JOptionPane.ERROR_MESSAGE); 269 270 System.out.println("Public Transport: StopImporter: No data found");271 268 } 272 269 } … … 307 304 if (Main.main.getCurrentDataSet() == null) 308 305 { 309 JOptionPane.showMessageDialog(null, "There exists no dataset." 310 + " Try to download data from the server or open an OSM file.", 311 "No data found", JOptionPane.ERROR_MESSAGE); 312 313 System.out.println("Public Transport: StopInserter: No data found"); 306 JOptionPane.showMessageDialog(null, tr("There exists no dataset." 307 + " Try to download data from the server or open an OSM file."), 308 tr("No data found"), JOptionPane.ERROR_MESSAGE); 314 309 315 310 return null; … … 345 340 { 346 341 for (int i = 0; i < selectedLines.length; ++i) 347 consideredLines.add(selectedLines[i]);342 consideredLines.add(selectedLines[i]); 348 343 } 349 344 else 350 345 { 351 346 for (int i = 0; i < table.getRowCount(); ++i) 352 consideredLines.add(new Integer(i));347 consideredLines.add(new Integer(i)); 353 348 } 354 349 return consideredLines; … … 366 361 { 367 362 if ((nodes.elementAt(i) != null) && 368 369 table.addRowSelectionInterval(i, i);363 (Main.main.getCurrentDataSet().isSelected(nodes.elementAt(i)))) 364 table.addRowSelectionInterval(i, i); 370 365 } 371 366 } … … 381 376 int j = consideredLines.elementAt(i); 382 377 if (nodes.elementAt(j) != null) 383 nodes.elementAt(j).visit(box);378 nodes.elementAt(j).visit(box); 384 379 } 385 380 if (box.getBounds() == null) … … 400 395 int j = consideredLines.elementAt(i); 401 396 if (nodes.elementAt(j) != null) 402 Main.main.getCurrentDataSet().addSelected(nodes.elementAt(j));397 Main.main.getCurrentDataSet().addSelected(nodes.elementAt(j)); 403 398 } 404 399 } … … 464 459 public void actionPerformed(ActionEvent e) 465 460 { 466 JTable table = dialog.getStoplistTable();467 int row = table.getEditingRow();468 if (row < 0)469 return;470 table.clearSelection();471 table.addRowSelectionInterval(row, row);472 Main.main.undoRedo.add473 (new TrackStoplistDeleteCommand(StopImporterAction.this));461 JTable table = dialog.getStoplistTable(); 462 int row = table.getEditingRow(); 463 if (row < 0) 464 return; 465 table.clearSelection(); 466 table.addRowSelectionInterval(row, row); 467 Main.main.undoRedo.add 468 (new TrackStoplistDeleteCommand(StopImporterAction.this)); 474 469 } 475 470 };
Note:
See TracChangeset
for help on using the changeset viewer.