From c384ad0e18129b9cb95b6015233d315ae105743c Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Sun, 20 Nov 2016 04:25:52 -0500 Subject: Draw runways --- src/main/java/com/benburwell/planes/gui/Main1090.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/benburwell/planes/gui/Main1090.java') 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 navaids = new CSVObjectStore<>(); private CSVObjectStore airports = new CSVObjectStore<>(); + private CSVObjectStore runways = new CSVObjectStore<>(); private RouteGraph routeGraph = new RouteGraph(); private int currentTcpConnection = 0; private JTabbedPane tabbedPane = new JTabbedPane(); @@ -59,6 +60,12 @@ public class Main1090 extends JFrame { System.out.println("Could not read airport file: " + e.getMessage()); } + 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 intersections = new CSVObjectStore<>(); intersections.readFromResource("/airways_db.csv", Intersection.class); @@ -72,7 +79,7 @@ public class Main1090 extends JFrame { private void createTabs() { List 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)); -- cgit v1.2.3