Commit 3efa05ff authored by firegnom's avatar firegnom
Browse files

added some generics in prefs dialog

parent ef550261
...@@ -53,6 +53,9 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene ...@@ -53,6 +53,9 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene
JButton okButton = new JButton(); JButton okButton = new JButton();
JButton cancelButton = new JButton(); JButton cancelButton = new JButton();
JPanel mainPanel = new JPanel(); JPanel mainPanel = new JPanel();
JPanel networkPanel = new JPanel();
JPanel advancedPanel = new JPanel();
JTabbedPane tabs = new JTabbedPane();
JPanel gfPanel = new JPanel(); JPanel gfPanel = new JPanel();
JPanel stopPanel = new JPanel(); JPanel stopPanel = new JPanel();
JPanel divePanel = new JPanel(); JPanel divePanel = new JPanel();
...@@ -76,7 +79,7 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene ...@@ -76,7 +79,7 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene
JCheckBox extendedOutputCB = new JCheckBox(); JCheckBox extendedOutputCB = new JCheckBox();
JCheckBox mvMultilevelModeCB = new JCheckBox(); JCheckBox mvMultilevelModeCB = new JCheckBox();
JRadioButton metricButton, imperialButton; JRadioButton metricButton, imperialButton;
// TODO use reflection ? // TODO use reflection ? i think it would be better to do it using annotations like @SelectableModel or just @Model
JComboBox cmbModel = new JComboBox(new String[] {"ZHL16B","ZHL16C"}); JComboBox cmbModel = new JComboBox(new String[] {"ZHL16B","ZHL16C"});
int outputStyle; // For prefs checkbox int outputStyle; // For prefs checkbox
...@@ -108,7 +111,11 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene ...@@ -108,7 +111,11 @@ public class PrefsDialog extends JDialog implements ActionListener, FocusListene
descentRateMax = Mvplan.prefs.getDescentRateMax(); descentRateMax = Mvplan.prefs.getDescentRateMax();
descentRateMin = Mvplan.prefs.getDescentRateMin(); descentRateMin = Mvplan.prefs.getDescentRateMin();
cont.add(mainPanel); cont.add(tabs);
tabs.add("Main",mainPanel);
tabs.add("Network",networkPanel);
tabs.add("Advanced",advancedPanel);
// GF Panel // GF Panel
Border gfBorder = BorderFactory.createEtchedBorder(); Border gfBorder = BorderFactory.createEtchedBorder();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment