diff options
author | Ben Burwell <ben.burwell@trifecta.com> | 2016-11-19 22:55:10 -0500 |
---|---|---|
committer | Ben Burwell <ben.burwell@trifecta.com> | 2016-11-19 22:55:10 -0500 |
commit | a448320cc4661f9304a8323d6c0e05f1f0fee2b3 (patch) | |
tree | 274310efc18316c48e0911a428a0f0bce7899033 /src/main/java/com/benburwell/planes/gui/navigationaids/NavigationAidComponent.java | |
parent | 70d15df43ea0d57c3fe237211098645733048c45 (diff) |
Use resources for data (for now)
At some point, it would be nice for this to be more configurable
Diffstat (limited to 'src/main/java/com/benburwell/planes/gui/navigationaids/NavigationAidComponent.java')
-rw-r--r-- | src/main/java/com/benburwell/planes/gui/navigationaids/NavigationAidComponent.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/com/benburwell/planes/gui/navigationaids/NavigationAidComponent.java b/src/main/java/com/benburwell/planes/gui/navigationaids/NavigationAidComponent.java new file mode 100644 index 0000000..1ad7e3e --- /dev/null +++ b/src/main/java/com/benburwell/planes/gui/navigationaids/NavigationAidComponent.java @@ -0,0 +1,28 @@ +package com.benburwell.planes.gui.navigationaids; + +import com.benburwell.planes.data.CSVObjectStore; +import com.benburwell.planes.data.NavigationAid; +import com.benburwell.planes.gui.ViewComponent; + +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(CSVObjectStore<NavigationAid> 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; + } +} |