X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosui%2FAltosEepromSelect.java;h=0a6eec173b3eeabcba9e736aec48c712920c9e27;hp=f0066aac51e9fa85b4fa8c28c91d8ab97b9ec3b3;hb=803bf106caf5d6b5ac12eb00a941647c7325edd1;hpb=df1c6ab3ac079199b5a12328c9ff5cfa6ac29b36 diff --git a/altosui/AltosEepromSelect.java b/altosui/AltosEepromSelect.java index f0066aac..0a6eec17 100644 --- a/altosui/AltosEepromSelect.java +++ b/altosui/AltosEepromSelect.java @@ -35,21 +35,24 @@ class AltosEepromItem implements ActionListener { JCheckBox delete; public void actionPerformed(ActionEvent e) { - System.out.printf("eeprom item action %s %d\n", e.getActionCommand(), e.getID()); if (e.getSource() == download) { log.download = download.isSelected(); - System.out.printf("download for flight %d set to %b\n", log.flight, log.download); } else if (e.getSource() == delete) { log.delete = delete.isSelected(); - System.out.printf("delete for flight %d set to %b\n", log.flight, log.delete); } } public AltosEepromItem(AltosEepromLog in_log) { log = in_log; - label = new JLabel(String.format("Flight #%02d - %04d-%02d-%02d", - log.flight, log.year, log.month, log.day)); + String text; + if (log.year != 0) + text = String.format("Flight #%02d - %04d-%02d-%02d", + log.flight, log.year, log.month, log.day); + else + text = String.format("Flight #%02d", log.flight); + + label = new JLabel(text); download = new JCheckBox("", log.download); download.addActionListener(this); @@ -119,7 +122,7 @@ public class AltosEepromSelect extends JDialog implements ActionListener { c.weightx = 0.5; c.anchor = GridBagConstraints.CENTER; c.insets = i; - JLabel flightHeaderLabel = new JLabel("Flight:"); + JLabel flightHeaderLabel = new JLabel("Flight"); flightPane.add(flightHeaderLabel, c); /* Download Header */ @@ -129,7 +132,7 @@ public class AltosEepromSelect extends JDialog implements ActionListener { c.weightx = 0.5; c.anchor = GridBagConstraints.CENTER; c.insets = i; - JLabel downloadHeaderLabel = new JLabel("Download:"); + JLabel downloadHeaderLabel = new JLabel("Download"); flightPane.add(downloadHeaderLabel, c); /* Delete Header */ @@ -139,7 +142,7 @@ public class AltosEepromSelect extends JDialog implements ActionListener { c.weightx = 0.5; c.anchor = GridBagConstraints.CENTER; c.insets = i; - JLabel deleteHeaderLabel = new JLabel("Delete:"); + JLabel deleteHeaderLabel = new JLabel("Delete"); flightPane.add(deleteHeaderLabel, c); /* Add the flights to the GridBag */