diff options
author | Keith Packard <keithp@keithp.com> | 2014-03-10 22:55:45 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-03-10 22:55:45 -0700 |
commit | 7e0b549b9b30d0a1290d28b2b94025a98af6a4de (patch) | |
tree | 6d9da082350da07a8823e46d8ec35faafa58695c /altosui/AltosAscent.java | |
parent | 3b50e50fb814a572f7b4ea9e268a1ae150fe678c (diff) |
altosui: Hide Tilt Angle values when not available
In the Ascent table, make sure the tilt angle fields are hidden when
they are set to MISSING.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosAscent.java')
-rw-r--r-- | altosui/AltosAscent.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/altosui/AltosAscent.java b/altosui/AltosAscent.java index 3f74fdd1..36871dd6 100644 --- a/altosui/AltosAscent.java +++ b/altosui/AltosAscent.java @@ -200,6 +200,13 @@ public class AltosAscent extends JComponent implements AltosFlightDisplay { } } } + + void hide() { + label.setVisible(false); + value.setVisible(false); + max_value.setVisible(false); + } + public AscentValueHold (GridBagLayout layout, int y, String text) { GridBagConstraints c = new GridBagConstraints(); c.weighty = 1; @@ -388,7 +395,10 @@ public class AltosAscent extends JComponent implements AltosFlightDisplay { apogee.hide(); speed.show(state, listener_state); accel.show(state, listener_state); - orient.show(state, listener_state); + if (state.orient() != AltosLib.MISSING) + orient.show(state, listener_state); + else + orient.hide(); } public void labels(GridBagLayout layout, int y) { |