summaryrefslogtreecommitdiff
path: root/altosui/AltosCompanionInfo.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-05-29 10:16:15 -0700
committerKeith Packard <keithp@keithp.com>2014-05-29 10:16:15 -0700
commit71715337eb532a1fbe1a753240e7417d5223489f (patch)
tree2042488d19584b89b661e48fe0dadbe555d4f174 /altosui/AltosCompanionInfo.java
parent13f84be8d1568a3fc2ed5eef5dcc2093c149285e (diff)
telegps: Add info table
Move a couple of files from altosui to altosuilib, hook up the info table after changing it to implement the AltosFlightDisplay interface Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosCompanionInfo.java')
-rw-r--r--altosui/AltosCompanionInfo.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/altosui/AltosCompanionInfo.java b/altosui/AltosCompanionInfo.java
index 42413a57..f8d033a8 100644
--- a/altosui/AltosCompanionInfo.java
+++ b/altosui/AltosCompanionInfo.java
@@ -20,8 +20,9 @@ package altosui;
import java.awt.*;
import javax.swing.*;
import org.altusmetrum.altoslib_4.*;
+import org.altusmetrum.altosuilib_2.*;
-public class AltosCompanionInfo extends JTable {
+public class AltosCompanionInfo extends JTable implements AltosFlightDisplay {
private AltosFlightInfoTableModel model;
static final int info_columns = 2;
@@ -50,7 +51,7 @@ public class AltosCompanionInfo extends JTable {
return getPreferredSize();
}
- void info_reset() {
+ public void reset() {
model.reset();
}
@@ -88,7 +89,7 @@ public class AltosCompanionInfo extends JTable {
return;
if (state.companion != null)
companion = state.companion;
- info_reset();
+ reset();
info_add_row(0, "Companion board", "%s", board_name());
if (companion != null) {
info_add_row(0, "Last Data", "%5d", companion.tick);