diff options
author | Keith Packard <keithp@keithp.com> | 2010-11-13 17:09:51 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-11-13 17:09:51 -0800 |
commit | 11c95f687b1f68d35fa1a0af2c4e7982b8bb226a (patch) | |
tree | e61f8631782eebbdd42060a7bc16f1fd9b10c447 /ao-tools/altosui/AltosFlightUI.java | |
parent | dcfa56498d1b65a213b8aba9cbd6c4806532383c (diff) |
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 <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosFlightUI.java')
-rw-r--r-- | ao-tools/altosui/AltosFlightUI.java | 10 |
1 files changed, 6 insertions, 4 deletions
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); |