import java.beans.*;
import javax.swing.*;
import javax.swing.event.*;
-import org.altusmetrum.altosuilib_1.*;
+import org.altusmetrum.altosuilib_3.*;
public class AltosConfigureUI
extends AltosUIConfigure
AltosVoice voice;
public JTextField callsign_value;
- public JComboBox position_value;
+ public JComboBox<String> position_value;
/* DocumentListener interface methods */
public void insertUpdate(DocumentEvent e) {
row++;
}
+ boolean has_bluetooth;
+
public void add_bluetooth() {
JButton manage_bluetooth = new JButton("Manage Bluetooth");
manage_bluetooth.addActionListener(new ActionListener() {
});
pane.add(manage_bluetooth, constraints(0, 2));
/* in the same row as add_frequencies, so don't bump row */
+ has_bluetooth = true;
}
public void add_frequencies() {
}
});
manage_frequencies.setToolTipText("Configure which values are shown in frequency menus");
- pane.add(manage_frequencies, constraints(2, 1));
+ if (has_bluetooth)
+ pane.add(manage_frequencies, constraints(2, 1));
+ else
+ pane.add(manage_frequencies, constraints(0, 3));
row++;
}
public void add_position() {
pane.add(new JLabel ("Menu position"), constraints(0, 1));
- position_value = new JComboBox (position_names);
+ position_value = new JComboBox<String>(position_names);
position_value.setMaximumRowCount(position_names.length);
int position = AltosUIPreferences.position();
position_value.setSelectedIndex(position);