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