diff options
| author | Keith Packard <keithp@keithp.com> | 2010-11-09 23:34:32 -0800 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2010-11-09 23:34:32 -0800 |
| commit | b0d31910da592e2f67c47c8fc3e15ce8135d5094 (patch) | |
| tree | 4caabe69247596dced4dc84063322b091e60b379 /ao-tools/altosui/AltosPad.java | |
| parent | 22d00785188a880700cd372528189a7a15278da9 (diff) | |
altosui: Add ascent, descent and landed tabs
This completes the set of tabs for in-flight status information.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosPad.java')
| -rw-r--r-- | ao-tools/altosui/AltosPad.java | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/ao-tools/altosui/AltosPad.java b/ao-tools/altosui/AltosPad.java index 133dbed3..7b72be20 100644 --- a/ao-tools/altosui/AltosPad.java +++ b/ao-tools/altosui/AltosPad.java @@ -35,12 +35,12 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { public class LaunchStatus { JLabel label; - JLabel value; + JTextField value; AltosLights lights; void show(AltosState state, int crc_errors) {} void reset() { - value.setText("0"); + value.setText(""); lights.set(false); } @@ -64,12 +64,11 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { layout.setConstraints(label, c); add(label); - value = new JLabel("4.00"); + value = new JTextField(10); value.setFont(label_font); value.setHorizontalAlignment(SwingConstants.RIGHT); c.gridx = 2; c.gridy = y; - c.anchor = GridBagConstraints.EAST; - c.fill = GridBagConstraints.EAST; + c.anchor = GridBagConstraints.WEST; layout.setConstraints(value, c); add(value); @@ -78,11 +77,11 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { public class LaunchValue { JLabel label; - JLabel value; + JTextField value; void show(AltosState state, int crc_errors) {} void reset() { - value.setText("0"); + value.setText(""); } public LaunchValue (GridBagLayout layout, int y, String text) { GridBagConstraints c = new GridBagConstraints(); @@ -93,16 +92,15 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { c.gridx = 1; c.gridy = y; c.insets = new Insets(10, 10, 10, 10); c.anchor = GridBagConstraints.WEST; - c.fill = GridBagConstraints.WEST; layout.setConstraints(label, c); add(label); - value = new JLabel("4.00"); + value = new JTextField(20); value.setFont(label_font); value.setHorizontalAlignment(SwingConstants.RIGHT); c.gridx = 2; c.gridy = y; c.anchor = GridBagConstraints.EAST; - c.fill = GridBagConstraints.EAST; + c.fill = GridBagConstraints.HORIZONTAL; layout.setConstraints(value, c); add(value); } |
