Changeset 33737 in osm for applications/editors/josm/plugins/public_transport
- Timestamp:
- 2017-10-27T01:29:14+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/public_transport
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/public_transport/build.xml
r32680 r33737 5 5 <property name="commit.message" value="Commit message"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value="1 0580"/>7 <property name="plugin.main.version" value="12636"/> 8 8 9 9 <property name="plugin.author" value="Roland M. Olbricht"/> -
applications/editors/josm/plugins/public_transport/src/public_transport/AbstractGTFSCatchJoinCommand.java
r33053 r33737 9 9 import java.util.List; 10 10 11 import org.openstreetmap.josm.Main;12 11 import org.openstreetmap.josm.command.Command; 13 12 import org.openstreetmap.josm.data.osm.DataSet; 14 13 import org.openstreetmap.josm.data.osm.Node; 15 14 import org.openstreetmap.josm.data.osm.OsmPrimitive; 15 import org.openstreetmap.josm.gui.MainApplication; 16 16 17 17 public abstract class AbstractGTFSCatchJoinCommand extends Command { … … 45 45 return false; 46 46 Node dest = null; 47 DataSet ds = Main .getLayerManager().getEditDataSet();47 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 48 48 Iterator<Node> iter = ds.getSelectedNodes().iterator(); 49 49 int j = workingLines.get(0); … … 88 88 int j = workingLines.get(0); 89 89 90 DataSet ds = Main .getLayerManager().getEditDataSet();90 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 91 91 Node node = gtfsStopTM.nodes.elementAt(j); 92 92 if (node != null) { -
applications/editors/josm/plugins/public_transport/src/public_transport/GTFSAddCommand.java
r33053 r33737 7 7 import java.util.Vector; 8 8 9 import org.openstreetmap.josm.Main;10 9 import org.openstreetmap.josm.command.Command; 11 10 import org.openstreetmap.josm.data.osm.Node; 12 11 import org.openstreetmap.josm.data.osm.OsmPrimitive; 12 import org.openstreetmap.josm.gui.MainApplication; 13 13 14 14 public class GTFSAddCommand extends Command { … … 70 70 if (node == null) 71 71 continue; 72 Main .getLayerManager().getEditDataSet().removePrimitive(node);72 MainApplication.getLayerManager().getEditDataSet().removePrimitive(node); 73 73 node.setDeleted(true); 74 74 } -
applications/editors/josm/plugins/public_transport/src/public_transport/GTFSDeleteCommand.java
r33053 r33737 7 7 import java.util.Vector; 8 8 9 import org.openstreetmap.josm.Main;10 9 import org.openstreetmap.josm.command.Command; 11 10 import org.openstreetmap.josm.data.osm.Node; 12 11 import org.openstreetmap.josm.data.osm.OsmPrimitive; 12 import org.openstreetmap.josm.gui.MainApplication; 13 13 14 14 public class GTFSDeleteCommand extends Command { … … 60 60 gtfsStopTM.nodes.set(j, null); 61 61 gtfsStopTM.setValueAt(tr("skipped"), j, 2); 62 Main .getLayerManager().getEditDataSet().removePrimitive(node);62 MainApplication.getLayerManager().getEditDataSet().removePrimitive(node); 63 63 node.setDeleted(true); 64 64 } … … 76 76 continue; 77 77 node.setDeleted(false); 78 Main .getLayerManager().getEditDataSet().addPrimitive(node);78 MainApplication.getLayerManager().getEditDataSet().addPrimitive(node); 79 79 } 80 80 } -
applications/editors/josm/plugins/public_transport/src/public_transport/GTFSImporterAction.java
r33053 r33737 30 30 import org.openstreetmap.josm.data.osm.OsmPrimitive; 31 31 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 32 import org.openstreetmap.josm.gui.MainApplication; 32 33 33 34 public class GTFSImporterAction extends JosmAction { … … 172 173 Vector<Node> existingStops = new Vector<>(); 173 174 174 DataSet ds = Main .getLayerManager().getEditDataSet();175 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 175 176 if (ds == null) { 176 177 JOptionPane.showMessageDialog(null, … … 236 237 node.put("stop_id", id); 237 238 node.put("name", name); 238 DataSet ds = Main .getLayerManager().getEditDataSet();239 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 239 240 if (ds == null) { 240 241 JOptionPane.showMessageDialog(null, … … 269 270 /** marks the table items whose nodes are marked on the map */ 270 271 public static void findNodesInTable(JTable table, Vector<Node> nodes) { 271 DataSet ds = Main .getLayerManager().getEditDataSet();272 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 272 273 if (ds == null) 273 274 return; … … 305 306 public static void markNodesFromTable(JTable table, Vector<Node> nodes) { 306 307 OsmPrimitive[] osmp = {null}; 307 DataSet ds = Main .getLayerManager().getEditDataSet();308 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 308 309 ds.setSelected(osmp); 309 310 Vector<Integer> consideredLines = getConsideredLines(table); -
applications/editors/josm/plugins/public_transport/src/public_transport/GTFSStopTableModel.java
r33166 r33737 11 11 import javax.swing.table.DefaultTableModel; 12 12 13 import org.openstreetmap.josm.Main;14 13 import org.openstreetmap.josm.data.DataSource; 15 14 import org.openstreetmap.josm.data.coor.LatLon; 16 15 import org.openstreetmap.josm.data.osm.DataSet; 17 16 import org.openstreetmap.josm.data.osm.Node; 17 import org.openstreetmap.josm.gui.MainApplication; 18 18 19 19 public class GTFSStopTableModel extends DefaultTableModel implements TableModelListener { … … 162 162 LatLon coor = new LatLon(lat, lon); 163 163 164 DataSet ds = Main .getLayerManager().getEditDataSet();164 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 165 165 if (ds != null) { 166 166 boolean inside = false; -
applications/editors/josm/plugins/public_transport/src/public_transport/PublicTransportAStar.java
r33053 r33737 8 8 import java.util.Vector; 9 9 10 import org.openstreetmap.josm.Main;11 10 import org.openstreetmap.josm.data.osm.Node; 12 11 import org.openstreetmap.josm.data.osm.Way; 12 import org.openstreetmap.josm.gui.MainApplication; 13 13 14 14 public class PublicTransportAStar extends AStarAlgorithm { … … 87 87 waysPerNode = new TreeMap<>(); 88 88 89 Iterator<Way> iter = Main .getLayerManager().getEditDataSet().getWays().iterator();89 Iterator<Way> iter = MainApplication.getLayerManager().getEditDataSet().getWays().iterator(); 90 90 while (iter.hasNext()) { 91 91 Way way = iter.next(); -
applications/editors/josm/plugins/public_transport/src/public_transport/RoutePatternAction.java
r33053 r33737 53 53 import org.openstreetmap.josm.data.osm.Way; 54 54 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 55 import org.openstreetmap.josm.gui.MainApplication; 55 56 56 57 public class RoutePatternAction extends JosmAction { … … 331 332 public void actionPerformed(ActionEvent event) { 332 333 Frame frame = JOptionPane.getFrameForComponent(Main.parent); 333 DataSet mainDataSet = Main .getLayerManager().getEditDataSet();334 DataSet mainDataSet = MainApplication.getLayerManager().getEditDataSet(); 334 335 335 336 if (jDialog == null) { … … 1057 1058 */ 1058 1059 } else if ("routePattern.overviewDelete".equals(event.getActionCommand())) { 1059 DeleteAction.deleteRelation(Main .getLayerManager().getEditLayer(), currentRoute);1060 DeleteAction.deleteRelation(MainApplication.getLayerManager().getEditLayer(), currentRoute); 1060 1061 1061 1062 currentRoute = null; … … 1104 1105 } else if ("routePattern.itineraryMark".equals(event.getActionCommand())) { 1105 1106 OsmPrimitive[] osmp = {null}; 1106 Main .getLayerManager().getEditDataSet().setSelected(osmp);1107 MainApplication.getLayerManager().getEditDataSet().setSelected(osmp); 1107 1108 markedWays.clear(); 1108 1109 if (itineraryTable.getSelectedRowCount() > 0) { … … 1334 1335 } else if ("routePattern.stoplistMark".equals(event.getActionCommand())) { 1335 1336 OsmPrimitive[] osmp = {null}; 1336 Main .getLayerManager().getEditDataSet().setSelected(osmp);1337 MainApplication.getLayerManager().getEditDataSet().setSelected(osmp); 1337 1338 markedNodes.clear(); 1338 1339 if (stoplistTable.getSelectedRowCount() > 0) { … … 1526 1527 // Determine for each member its position on the itinerary: position means here the 1527 1528 // point on the itinerary that has minimal distance to the coor 1528 mainDataSet = Main .getLayerManager().getEditDataSet();1529 mainDataSet = MainApplication.getLayerManager().getEditDataSet(); 1529 1530 if (mainDataSet != null) { 1530 1531 String stopKey = ""; … … 1596 1597 currentRoute = copy; 1597 1598 1598 DataSet mainDataSet = Main .getLayerManager().getEditDataSet();1599 DataSet mainDataSet = MainApplication.getLayerManager().getEditDataSet(); 1599 1600 if (mainDataSet != null) { 1600 1601 Vector<RouteReference> relRefs = new Vector<>(); -
applications/editors/josm/plugins/public_transport/src/public_transport/StopImporterAction.java
r33053 r33737 34 34 import org.openstreetmap.josm.data.osm.OsmPrimitive; 35 35 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 36 import org.openstreetmap.josm.gui.MainApplication; 36 37 import org.openstreetmap.josm.io.GpxReader; 37 38 import org.xml.sax.SAXException; … … 243 244 setTagsWrtType(node, type); 244 245 node.put("name", name); 245 DataSet ds = Main .getLayerManager().getEditDataSet();246 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 246 247 if (ds == null) { 247 248 JOptionPane.showMessageDialog(null, … … 292 293 /** marks the table items whose nodes are marked on the map */ 293 294 public static void findNodesInTable(JTable table, Vector<Node> nodes) { 294 DataSet ds = Main .getLayerManager().getEditDataSet();295 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 295 296 if (ds == null) 296 297 return; … … 326 327 public static void markNodesFromTable(JTable table, Vector<Node> nodes) { 327 328 OsmPrimitive[] osmp = {null}; 328 DataSet ds = Main .getLayerManager().getEditDataSet();329 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); 329 330 ds.setSelected(osmp); 330 331 Vector<Integer> consideredLines = getConsideredLines(table); -
applications/editors/josm/plugins/public_transport/src/public_transport/TrackStoplistDeleteCommand.java
r33053 r33737 7 7 import java.util.Vector; 8 8 9 import org.openstreetmap.josm.Main;10 9 import org.openstreetmap.josm.command.Command; 11 10 import org.openstreetmap.josm.data.osm.Node; 12 11 import org.openstreetmap.josm.data.osm.OsmPrimitive; 12 import org.openstreetmap.josm.gui.MainApplication; 13 13 14 14 public class TrackStoplistDeleteCommand extends Command { … … 65 65 if (node == null) 66 66 continue; 67 Main .getLayerManager().getEditDataSet().removePrimitive(node);67 MainApplication.getLayerManager().getEditDataSet().removePrimitive(node); 68 68 node.setDeleted(true); 69 69 } … … 80 80 continue; 81 81 ntn.node.setDeleted(false); 82 Main .getLayerManager().getEditDataSet().addPrimitive(ntn.node);82 MainApplication.getLayerManager().getEditDataSet().addPrimitive(ntn.node); 83 83 } 84 84 } -
applications/editors/josm/plugins/public_transport/src/public_transport/TrackSuggestStopsCommand.java
r33053 r33737 8 8 import java.util.Vector; 9 9 10 import org.openstreetmap.josm.Main;11 10 import org.openstreetmap.josm.command.Command; 12 11 import org.openstreetmap.josm.data.coor.LatLon; … … 15 14 import org.openstreetmap.josm.data.osm.Node; 16 15 import org.openstreetmap.josm.data.osm.OsmPrimitive; 16 import org.openstreetmap.josm.gui.MainApplication; 17 17 18 18 public class TrackSuggestStopsCommand extends Command { … … 65 65 if (node == null) 66 66 continue; 67 Main .getLayerManager().getEditDataSet().removePrimitive(node);67 MainApplication.getLayerManager().getEditDataSet().removePrimitive(node); 68 68 node.setDeleted(true); 69 69 } … … 173 173 if (node == null) 174 174 continue; 175 Main .getLayerManager().getEditDataSet().removePrimitive(node);175 MainApplication.getLayerManager().getEditDataSet().removePrimitive(node); 176 176 node.setDeleted(true); 177 177 } … … 186 186 continue; 187 187 node.setDeleted(false); 188 Main .getLayerManager().getEditDataSet().addPrimitive(node);188 MainApplication.getLayerManager().getEditDataSet().addPrimitive(node); 189 189 } 190 190 } -
applications/editors/josm/plugins/public_transport/src/public_transport/WaypointsDisableCommand.java
r33053 r33737 7 7 import java.util.Vector; 8 8 9 import org.openstreetmap.josm.Main;10 9 import org.openstreetmap.josm.command.Command; 11 10 import org.openstreetmap.josm.data.osm.Node; 12 11 import org.openstreetmap.josm.data.osm.OsmPrimitive; 12 import org.openstreetmap.josm.gui.MainApplication; 13 13 14 14 public class WaypointsDisableCommand extends Command { … … 54 54 continue; 55 55 waypointTM.nodes.set(j, null); 56 Main .getLayerManager().getEditDataSet().removePrimitive(node);56 MainApplication.getLayerManager().getEditDataSet().removePrimitive(node); 57 57 node.setDeleted(true); 58 58 } … … 69 69 continue; 70 70 node.setDeleted(false); 71 Main .getLayerManager().getEditDataSet().addPrimitive(node);71 MainApplication.getLayerManager().getEditDataSet().addPrimitive(node); 72 72 } 73 73 } -
applications/editors/josm/plugins/public_transport/src/public_transport/WaypointsEnableCommand.java
r33053 r33737 7 7 import java.util.Vector; 8 8 9 import org.openstreetmap.josm.Main;10 9 import org.openstreetmap.josm.command.Command; 11 10 import org.openstreetmap.josm.data.osm.Node; 12 11 import org.openstreetmap.josm.data.osm.OsmPrimitive; 12 import org.openstreetmap.josm.gui.MainApplication; 13 13 14 14 public class WaypointsEnableCommand extends Command { … … 65 65 if (node == null) 66 66 continue; 67 Main .getLayerManager().getEditDataSet().removePrimitive(node);67 MainApplication.getLayerManager().getEditDataSet().removePrimitive(node); 68 68 node.setDeleted(true); 69 69 }
Note:
See TracChangeset
for help on using the changeset viewer.