Changeset 32538 in osm for applications/editors/josm/plugins/public_transport_layer/src
- Timestamp:
- 2016-07-02T22:07:14+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/public_transport_layer/src/ptl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/public_transport_layer/src/ptl/DistanceBetweenStops.java
r32475 r32538 1 // License: GPL. For details, see LICENSE file. 1 2 package ptl; 2 3 … … 54 55 final List<Node> nodes = routeSegments.get(i).getWay().getNodes(); 55 56 switch (link.direction) { 56 57 58 59 60 61 57 case BACKWARD: 58 Collections.reverse(nodes); 59 // fall through 60 case FORWARD: 61 routeNodes.addAll(link.linkPrev ? nodes.subList(1, nodes.size()) : nodes); 62 break; 62 63 } 63 64 } … … 137 138 if (!isRouteSupported(relation)) { 138 139 JOptionPane.showMessageDialog(Main.parent, "<html>" + tr("A valid public_transport:version=2 route is required") 139 140 140 + Utils.joinAsHtmlUnorderedList(Collections.singleton(relation.getDisplayName(DefaultNameFormatter.getInstance()))), 141 tr("Invalid selection"), JOptionPane.WARNING_MESSAGE); 141 142 continue; 142 143 } -
applications/editors/josm/plugins/public_transport_layer/src/ptl/Plugin.java
r32142 r32538 1 // License: GPL. For details, see LICENSE file. 1 2 package ptl; 2 3 -
applications/editors/josm/plugins/public_transport_layer/src/ptl/PublicTransportLayer.java
r32475 r32538 1 // License: GPL. For details, see LICENSE file. 1 2 package ptl; 2 3 … … 75 76 color = ColorHelper.html2color(relation.get("colour")); 76 77 } catch (RuntimeException ignore) { 78 Main.trace(ignore); 77 79 } 78 80 renderer.drawWay(way, color, new BasicStroke(1), null, null, 0, doDrawArrows, false, false, false); … … 87 89 for (Pair<Node, Node> nodePair : segmentRefs.keySet()) { 88 90 final String label = Utils.join(tr(", "), new TreeSet<>(segmentRefs.get(nodePair))); 89 final TextLabel text = new TextLabel(new LabelCompositionStrategy.StaticLabelCompositionStrategy(label), new Font("SansSerif", Font.PLAIN, 16), 0, 0, new Color(0x80FFFFFF, true), 0f, null); 91 final TextLabel text = new TextLabel(new LabelCompositionStrategy.StaticLabelCompositionStrategy(label), 92 new Font("SansSerif", Font.PLAIN, 16), 0, 0, new Color(0x80FFFFFF, true), 0f, null); 90 93 final Way way = new Way(); 91 94 way.addNode(nodePair.a);
Note:
See TracChangeset
for help on using the changeset viewer.