- void hide() {
- label.setVisible(false);
- value.setVisible(false);
+ void show(String s) {
+ show();
+ value.setText(s);
+ }
+
+ void show(AltosUnits units, double v) {
+ show(units.show(8, v));
- show();
- value.setText(String.format(format, v));
+ show(String.format(format, v));
+ }
+
+ public void set_font() {
+ label.setFont(Altos.label_font);
+ value.setFont(Altos.value_font);
public LandedValue (GridBagLayout layout, int y, String text) {
GridBagConstraints c = new GridBagConstraints();
c.weighty = 1;
label = new JLabel(text);
public LandedValue (GridBagLayout layout, int y, String text) {
GridBagConstraints c = new GridBagConstraints();
c.weighty = 1;
label = new JLabel(text);
label.setHorizontalAlignment(SwingConstants.LEFT);
c.gridx = 0; c.gridy = y;
c.insets = new Insets(10, 10, 10, 10);
label.setHorizontalAlignment(SwingConstants.LEFT);
c.gridx = 0; c.gridy = y;
c.insets = new Insets(10, 10, 10, 10);
value.setHorizontalAlignment(SwingConstants.RIGHT);
c.gridx = 1; c.gridy = y;
c.anchor = GridBagConstraints.WEST;
value.setHorizontalAlignment(SwingConstants.RIGHT);
c.gridx = 1; c.gridy = y;
c.anchor = GridBagConstraints.WEST;
class Lat extends LandedValue {
void show (AltosState state, int crc_errors) {
class Lat extends LandedValue {
void show (AltosState state, int crc_errors) {
}
public Lat (GridBagLayout layout, int y) {
super (layout, y, "Latitude");
}
public Lat (GridBagLayout layout, int y) {
super (layout, y, "Latitude");
void show (AltosState state, int crc_errors) {
show();
if (state.gps != null && state.gps.connected)
void show (AltosState state, int crc_errors) {
show();
if (state.gps != null && state.gps.connected)
}
public Lon (GridBagLayout layout, int y) {
super (layout, y, "Longitude");
}
public Lon (GridBagLayout layout, int y) {
super (layout, y, "Longitude");
if (state.from_pad != null)
show("%3.0f°", state.from_pad.bearing);
else
if (state.from_pad != null)
show("%3.0f°", state.from_pad.bearing);
else
}
public Bearing (GridBagLayout layout, int y) {
super (layout, y, "Bearing");
}
public Bearing (GridBagLayout layout, int y) {
super (layout, y, "Bearing");
void show (AltosState state, int crc_errors) {
show();
if (state.from_pad != null)
void show (AltosState state, int crc_errors) {
show();
if (state.from_pad != null)
}
public Distance (GridBagLayout layout, int y) {
super (layout, y, "Distance");
}
public Distance (GridBagLayout layout, int y) {
super (layout, y, "Distance");
class Height extends LandedValue {
void show (AltosState state, int crc_errors) {
class Height extends LandedValue {
void show (AltosState state, int crc_errors) {
}
public Height (GridBagLayout layout, int y) {
super (layout, y, "Maximum Height");
}
public Height (GridBagLayout layout, int y) {
super (layout, y, "Maximum Height");
class Speed extends LandedValue {
void show (AltosState state, int crc_errors) {
class Speed extends LandedValue {
void show (AltosState state, int crc_errors) {
}
public Speed (GridBagLayout layout, int y) {
super (layout, y, "Maximum Speed");
}
public Speed (GridBagLayout layout, int y) {
super (layout, y, "Maximum Speed");
class Accel extends LandedValue {
void show (AltosState state, int crc_errors) {
class Accel extends LandedValue {
void show (AltosState state, int crc_errors) {
}
public Accel (GridBagLayout layout, int y) {
super (layout, y, "Maximum Acceleration");
}
public Accel (GridBagLayout layout, int y) {
super (layout, y, "Maximum Acceleration");
public void show(AltosState state, int crc_errors) {
if (state.gps != null && state.gps.connected) {
bearing.show(state, crc_errors);
public void show(AltosState state, int crc_errors) {
if (state.gps != null && state.gps.connected) {
bearing.show(state, crc_errors);
} else if (filename.endsWith("telem")) {
FileInputStream in = new FileInputStream(file);
records = new AltosTelemetryIterable(in);
} else if (filename.endsWith("telem")) {
FileInputStream in = new FileInputStream(file);
records = new AltosTelemetryIterable(in);
} catch (InterruptedException ie) {
} catch (IOException ie) {
}
} catch (FileNotFoundException fe) {
JOptionPane.showMessageDialog(null,
} catch (InterruptedException ie) {
} catch (IOException ie) {
}
} catch (FileNotFoundException fe) {
JOptionPane.showMessageDialog(null,