summaryrefslogtreecommitdiff
path: root/src/main/java/com/benburwell/planes/gui/NavigationAidComponent.java
diff options
context:
space:
mode:
authorBen Burwell <ben.burwell@trifecta.com>2016-11-19 22:14:13 -0500
committerBen Burwell <ben.burwell@trifecta.com>2016-11-19 22:14:13 -0500
commit70d15df43ea0d57c3fe237211098645733048c45 (patch)
treea0337b61a1cf89e2c9391226fc10c661f8085373 /src/main/java/com/benburwell/planes/gui/NavigationAidComponent.java
parent3c9729bd52dc24c0109a18d1924d30a9c14b3b06 (diff)
Add airports
Diffstat (limited to 'src/main/java/com/benburwell/planes/gui/NavigationAidComponent.java')
-rw-r--r--src/main/java/com/benburwell/planes/gui/NavigationAidComponent.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/com/benburwell/planes/gui/NavigationAidComponent.java b/src/main/java/com/benburwell/planes/gui/NavigationAidComponent.java
new file mode 100644
index 0000000..a1f97cf
--- /dev/null
+++ b/src/main/java/com/benburwell/planes/gui/NavigationAidComponent.java
@@ -0,0 +1,26 @@
+package com.benburwell.planes.gui;
+
+import com.benburwell.planes.data.NavigationAidStore;
+
+import javax.swing.*;
+
+/**
+ * Created by ben on 11/19/16.
+ */
+public class NavigationAidComponent implements ViewComponent {
+ private JTable table;
+ private NavigationAidsTableModel tableModel;
+ private JScrollPane scrollPane;
+
+ public NavigationAidComponent(NavigationAidStore store) {
+ this.tableModel = new NavigationAidsTableModel(store);
+ this.table = new JTable(this.tableModel);
+ this.table.setFillsViewportHeight(true);
+ this.scrollPane = new JScrollPane(table);
+ }
+
+ @Override
+ public JComponent getComponent() {
+ return this.scrollPane;
+ }
+}