summaryrefslogtreecommitdiff
path: root/altosui/AltosLanded.java
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2011-08-24 21:26:26 -0600
committerBdale Garbee <bdale@gag.com>2011-08-24 21:26:26 -0600
commit3d88e0493ab446d7c7011786390d30618a72d045 (patch)
treedcabf5ccfd09dc11a44844664b4d1a1ff8fef598 /altosui/AltosLanded.java
parent02d65453225a3807e61b2ac6e2a26da31a05bd45 (diff)
parent5a9972d41a87d4204c6c93cacf14e2962cc1c59c (diff)
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'altosui/AltosLanded.java')
-rw-r--r--altosui/AltosLanded.java23
1 files changed, 17 insertions, 6 deletions
diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java
index 71c10663..50e6b542 100644
--- a/altosui/AltosLanded.java
+++ b/altosui/AltosLanded.java
@@ -30,8 +30,6 @@ import java.util.concurrent.LinkedBlockingQueue;
public class AltosLanded extends JComponent implements AltosFlightDisplay, ActionListener {
GridBagLayout layout;
- Font label_font;
- Font value_font;
public class LandedValue {
JLabel label;
@@ -47,6 +45,11 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
value.setVisible(true);
}
+ public void set_font() {
+ label.setFont(Altos.label_font);
+ value.setFont(Altos.value_font);
+ }
+
void hide() {
label.setVisible(false);
value.setVisible(false);
@@ -63,7 +66,7 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
c.weighty = 1;
label = new JLabel(text);
- label.setFont(label_font);
+ label.setFont(Altos.label_font);
label.setHorizontalAlignment(SwingConstants.LEFT);
c.gridx = 0; c.gridy = y;
c.insets = new Insets(10, 10, 10, 10);
@@ -74,7 +77,7 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
add(label);
value = new JTextField(Altos.text_width);
- value.setFont(value_font);
+ value.setFont(Altos.value_font);
value.setHorizontalAlignment(SwingConstants.RIGHT);
c.gridx = 1; c.gridy = y;
c.anchor = GridBagConstraints.WEST;
@@ -199,6 +202,16 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
accel.reset();
}
+ public void set_font() {
+ lat.set_font();
+ lon.set_font();
+ bearing.set_font();
+ distance.set_font();
+ height.set_font();
+ speed.set_font();
+ accel.set_font();
+ }
+
public void show(AltosState state, int crc_errors) {
if (state.gps != null && state.gps.connected) {
bearing.show(state, crc_errors);
@@ -259,8 +272,6 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio
reader = in_reader;
- label_font = new Font("Dialog", Font.PLAIN, 22);
- value_font = new Font("Monospaced", Font.PLAIN, 22);
setLayout(layout);
/* Elements in descent display */