public class AltosDescent extends JComponent implements AltosFlightDisplay {
GridBagLayout layout;
- Font label_font;
- Font value_font;
public class DescentValue {
JLabel label;
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);
+ c.insets = new Insets(Altos.tab_elt_pad, Altos.tab_elt_pad, Altos.tab_elt_pad, Altos.tab_elt_pad);
c.anchor = GridBagConstraints.WEST;
c.fill = GridBagConstraints.VERTICAL;
c.weightx = 0;
add(label);
value = new JTextField(30);
- value.setFont(value_font);
+ value.setFont(Altos.value_font);
value.setHorizontalAlignment(SwingConstants.RIGHT);
c.gridx = 1; c.gridy = y;
c.gridwidth = 2;
c.weighty = 1;
label = new JLabel("Bearing");
- 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);
+ c.insets = new Insets(Altos.tab_elt_pad, Altos.tab_elt_pad, Altos.tab_elt_pad, Altos.tab_elt_pad);
c.anchor = GridBagConstraints.WEST;
c.weightx = 0;
c.fill = GridBagConstraints.VERTICAL;
add(label);
value = new JTextField(30);
- value.setFont(value_font);
+ value.setFont(Altos.value_font);
value.setHorizontalAlignment(SwingConstants.RIGHT);
c.gridx = 1; c.gridy = y;
c.anchor = GridBagConstraints.EAST;
add(value);
value_deg = new JTextField(5);
- value_deg.setFont(value_font);
+ value_deg.setFont(Altos.value_font);
value_deg.setHorizontalAlignment(SwingConstants.RIGHT);
c.gridx = 2; c.gridy = y;
c.anchor = GridBagConstraints.EAST;
public AltosDescent() {
layout = new GridBagLayout();
- label_font = new Font("Dialog", Font.PLAIN, 24);
- value_font = new Font("Monospaced", Font.PLAIN, 24);
setLayout(layout);
/* Elements in descent display */