Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

sort vertices by label so that it is easier to find transit stops ami…

…d journey vertices
  • Loading branch information...
commit 11b4ce46bab14d3759aebefbc76278c06ce5a8bc 1 parent b230ea8
novalis authored
View
10 opentripplanner-gui/src/main/java/org/opentripplanner/gui/VizGui.java
@@ -29,6 +29,8 @@
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.HashSet;
@@ -921,6 +923,14 @@ public static void main(String args[]) {
}
public void verticesSelected(final List<Vertex> selected) {
+ //sort vertices by name
+ Collections.sort(selected, new Comparator<Vertex>() {
+ @Override
+ public int compare(Vertex arg0, Vertex arg1) {
+ return arg0.getLabel().compareTo(arg1.getLabel());
+ }
+
+ });
ListModel data = new VertexList(selected);
nearbyVertices.setModel(data);
}
Please sign in to comment.
Something went wrong with that request. Please try again.