+ load_library(null);
+
+ java.net.URL imgURL = AltosUI.class.getResource("/altus-metrum-16x16.jpg");
+ if (imgURL != null)
+ setIconImage(new ImageIcon(imgURL).getImage());
+
+ AltosPreferences.init(this);
+
+ pane = getContentPane();
+ gridbag = new GridBagLayout();
+ pane.setLayout(gridbag);
+
+ JButton b;
+
+ b = addButton(0, 0, "Monitor Flight");
+ b.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ ConnectToDevice();
+ }
+ });
+ b = addButton(1, 0, "Save Flight Data");
+ b.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ SaveFlightData();
+ }
+ });
+ b = addButton(2, 0, "Replay Flight");
+ b.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ Replay();
+ }
+ });
+ b = addButton(3, 0, "Graph Data");
+ b.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ GraphData();
+ }
+ });
+ b = addButton(4, 0, "Export Data");
+ b.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ ExportData();
+ }
+ });
+ b = addButton(0, 1, "Configure TeleMetrum");
+ b.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ ConfigureTeleMetrum();
+ }
+ });
+
+ b = addButton(1, 1, "Configure AltosUI");
+ b.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ ConfigureAltosUI();
+ }
+ });