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++;
}
buttonPane.add(cancel_button);
buttonPane.add(Box.createRigidArea(new Dimension(10, 0)));
- add_bluetooth();
+ if (AltosUILib.has_bluetooth)
+ add_bluetooth();
buttonPane.add(select_button);
static public boolean initialized = false;
static public boolean loaded_library = false;
+ static public boolean has_bluetooth = false;
static final String[] library_names = { "altos", "altos32", "altos64" };
loaded_library = false;
}
}
+
+ String OS = System.getProperty("os.name");
+
+ if (OS.startsWith("Linux")) {
+ has_bluetooth = true;
+ }
+
initialized = true;
}
return loaded_library;