summaryrefslogtreecommitdiff
path: root/src/main/java/com/benburwell/planes/gui/Main1090.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/benburwell/planes/gui/Main1090.java')
-rw-r--r--src/main/java/com/benburwell/planes/gui/Main1090.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/com/benburwell/planes/gui/Main1090.java b/src/main/java/com/benburwell/planes/gui/Main1090.java
index ac75d03..71105a9 100644
--- a/src/main/java/com/benburwell/planes/gui/Main1090.java
+++ b/src/main/java/com/benburwell/planes/gui/Main1090.java
@@ -29,6 +29,7 @@ public class Main1090 extends JFrame {
private AircraftStore aircraft = new AircraftStore();
private CSVObjectStore<NavigationAid> navaids = new CSVObjectStore<>();
private CSVObjectStore<Airport> airports = new CSVObjectStore<>();
+ private CSVObjectStore<Runway> runways = new CSVObjectStore<>();
private RouteGraph routeGraph = new RouteGraph();
private int currentTcpConnection = 0;
private JTabbedPane tabbedPane = new JTabbedPane();
@@ -60,6 +61,12 @@ public class Main1090 extends JFrame {
}
try {
+ this.runways.readFromResource("/runways.csv", Runway.class);
+ } catch (IOException | InstantiationException | IllegalAccessException e) {
+ System.out.println("Could not read runway file: " + e.getMessage());
+ }
+
+ try {
CSVObjectStore<Intersection> intersections = new CSVObjectStore<>();
intersections.readFromResource("/airways_db.csv", Intersection.class);
intersections.getObjects().forEach(intersection -> this.routeGraph.addIntersection(intersection));
@@ -72,7 +79,7 @@ public class Main1090 extends JFrame {
private void createTabs() {
List<Tabbable> tabs = new ArrayList<>();
- tabs.add(new AircraftMapComponent(this.aircraft, this.navaids, this.airports, this.routeGraph));
+ tabs.add(new AircraftMapComponent(this.aircraft, this.navaids, this.airports, this.routeGraph, this.runways));
tabs.add(new AircraftTableComponent(this.aircraft));
tabs.add(new NavigationAidComponent(this.navaids));
tabs.add(new AirportsComponent(this.airports));