From bfbabfa60f3cedd994f693867bce56aad05be02a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 13 Jun 2014 22:04:57 -0700 Subject: telegps: Allow TeleGPS preferences to have a custom title and label Don't just inherit the AltosUI ones Signed-off-by: Keith Packard --- telegps/TeleGPSPreferences.java | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'telegps/TeleGPSPreferences.java') diff --git a/telegps/TeleGPSPreferences.java b/telegps/TeleGPSPreferences.java index 534cf550..8bd371f4 100644 --- a/telegps/TeleGPSPreferences.java +++ b/telegps/TeleGPSPreferences.java @@ -112,38 +112,8 @@ public class TeleGPSPreferences row++; } - final static String[] position_names = { - "Top left", - "Top", - "Top right", - "Left", - "Center", - "Right", - "Bottom left", - "Bottom", - "Bottom right", - }; - - public void add_position() { - pane.add(new JLabel ("Menu position"), constraints(0, 1)); - - position_value = new JComboBox(position_names); - position_value.setMaximumRowCount(position_names.length); - int position = AltosUIPreferences.position(); - position_value.setSelectedIndex(position); - position_value.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - int position = position_value.getSelectedIndex(); - AltosUIPreferences.set_position(position); - } - }); - pane.add(position_value, constraints(1, 2, GridBagConstraints.BOTH)); - position_value.setToolTipText("Position of main AltosUI window"); - row++; - } - public TeleGPSPreferences(JFrame owner, AltosVoice voice) { - super(owner); + super(owner, "TeleGPS Preferences", "Configure TeleGPS"); this.voice = voice; } -- cgit v1.2.3