*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package org.altusmetrum.altosuilib_10;
+package org.altusmetrum.altosuilib_11;
import java.awt.*;
import javax.swing.*;
import java.util.*;
-import org.altusmetrum.altoslib_10.*;
+import org.altusmetrum.altoslib_11.*;
public class AltosFlightStatsTable extends JComponent implements AltosFontListener {
GridBagLayout layout;
String.format("%5.0f m", stats.max_gps_height),
String.format("%5.0f ft", AltosConvert.meters_to_feet(stats.max_gps_height)));
}
- new FlightStat(layout, y++, "Maximum speed",
- String.format("%5.0f m/s", stats.max_speed),
- String.format("%5.0f fps", AltosConvert.mps_to_fps(stats.max_speed)),
- String.format("Mach %4.1f", AltosConvert.meters_to_mach(stats.max_speed)));
+ if (stats.max_speed != AltosLib.MISSING) {
+ new FlightStat(layout, y++, "Maximum speed",
+ String.format("%5.0f m/s", stats.max_speed),
+ String.format("%5.0f fps", AltosConvert.mps_to_fps(stats.max_speed)),
+ String.format("Mach %4.1f", AltosConvert.meters_to_mach(stats.max_speed)));
+ }
if (stats.max_acceleration != AltosLib.MISSING)
new FlightStat(layout, y++, "Maximum boost acceleration",
String.format("%5.0f m/s²", stats.max_acceleration),