+ class Flight extends Value {
+
+ int last_flight = -1;
+
+ void show(AltosState state, AltosListenerState listener_state) {
+ AltosCalData cal_data = state.cal_data();
+ if (cal_data.flight != last_flight) {
+ if (cal_data.flight == AltosLib.MISSING)
+ value.setText("none");
+ else
+ value.setText(String.format("%d", cal_data.flight));
+ last_flight = cal_data.flight;
+ }
+ }
+
+ public void reset() {
+ super.reset();
+ last_flight = -1;
+ }
+
+ public Flight (GridBagLayout layout, int x) {
+ super (layout, x, "Flight");
+ }
+ }
+
+ Flight flight;
+