From 11c95f687b1f68d35fa1a0af2c4e7982b8bb226a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 13 Nov 2010 17:09:51 -0800 Subject: altosui: Replace flight status table with labels, fix resize. There's no reason to use a table for the flight status data, replace that with a selection of widgets instead. Also, set all of the grid bag constraints for the various flight status displays so that resize does something sensible. Adds a scrollbar to the table display so that it can shrink. Signed-off-by: Keith Packard --- ao-tools/altosui/AltosFlightUI.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ao-tools/altosui/AltosFlightUI.java') diff --git a/ao-tools/altosui/AltosFlightUI.java b/ao-tools/altosui/AltosFlightUI.java index 3581c54c..ae31048d 100644 --- a/ao-tools/altosui/AltosFlightUI.java +++ b/ao-tools/altosui/AltosFlightUI.java @@ -45,7 +45,8 @@ public class AltosFlightUI extends JFrame implements AltosFlightDisplay { AltosDescent descent; AltosLanded landed; - private AltosStatusTable flightStatus; + private AltosFlightStatus flightStatus; + private JScrollPane flightInfoPane; private AltosInfoTable flightInfo; static final int tab_pad = 1; @@ -117,7 +118,7 @@ public class AltosFlightUI extends JFrame implements AltosFlightDisplay { } cur_tab = tab; } - flightStatus.set(state); + flightStatus.show(state, crc_errors); flightInfo.show(state, crc_errors); } @@ -133,7 +134,7 @@ public class AltosFlightUI extends JFrame implements AltosFlightDisplay { setTitle(String.format("AltOS %s", reader.name)); - flightStatus = new AltosStatusTable(); + flightStatus = new AltosFlightStatus(); vbox = new Box (BoxLayout.Y_AXIS); vbox.add(flightStatus); @@ -153,7 +154,8 @@ public class AltosFlightUI extends JFrame implements AltosFlightDisplay { pane.add("Landed", landed); flightInfo = new AltosInfoTable(); - pane.add("Table", flightInfo.box()); + flightInfoPane = new JScrollPane(flightInfo.box()); + pane.add("Table", flightInfoPane); vbox.add(pane); -- cgit v1.2.3