+ if (y == max_rows) {
+ x++;
+ y = 0;
+ }
+ }
+
+ public void add_units() {
+ /* Imperial units setting */
+
+ /* Add label */
+ JRadioButton imperial_units = new JRadioButton("Imperial Units", AltosUIPreferences.imperial_units());
+ imperial_units.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ JRadioButton item = (JRadioButton) e.getSource();
+ boolean enabled = item.isSelected();
+ AltosUIPreferences.set_imperial_units(enabled);
+ }
+ });
+ imperial_units.setToolTipText("Use Imperial units instead of metric");
+ GridBagConstraints c = new GridBagConstraints();
+ c.gridx = 0; c.gridy = 1000;
+ c.fill = GridBagConstraints.NONE;
+ c.anchor = GridBagConstraints.LINE_START;
+ c.insets = il;
+ add(imperial_units, c);