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/AltosLanded.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ao-tools/altosui/AltosLanded.java') 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); } -- cgit v1.2.3