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/AltosLanded.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/AltosLanded.java')
-rw-r--r-- | ao-tools/altosui/AltosLanded.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ao-tools/altosui/AltosLanded.java b/ao-tools/altosui/AltosLanded.java index d170ccad..465c9dce 100644 --- a/ao-tools/altosui/AltosLanded.java +++ b/ao-tools/altosui/AltosLanded.java @@ -48,6 +48,7 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay { public LandedValue (GridBagLayout layout, int y, String text) { GridBagConstraints c = new GridBagConstraints(); + c.weighty = 1; label = new JLabel(text); label.setFont(label_font); @@ -55,6 +56,8 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay { c.gridx = 0; c.gridy = y; c.insets = new Insets(10, 10, 10, 10); c.anchor = GridBagConstraints.WEST; + c.weightx = 0; + c.fill = GridBagConstraints.VERTICAL; layout.setConstraints(label, c); add(label); @@ -63,7 +66,8 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay { value.setHorizontalAlignment(SwingConstants.RIGHT); c.gridx = 1; c.gridy = y; c.anchor = GridBagConstraints.WEST; - c.fill = GridBagConstraints.HORIZONTAL; + c.weightx = 1; + c.fill = GridBagConstraints.BOTH; layout.setConstraints(value, c); add(value); } |