diff options
| author | Keith Packard <keithp@keithp.com> | 2014-04-11 16:40:06 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2014-04-11 16:40:06 -0700 |
| commit | 9e18c524fa2d1f648f265b3c3105f5ceacf06c10 (patch) | |
| tree | 70eef3b41a40ca5401a45ae1894847a77409b203 /altosui | |
| parent | 7b275ddfe20f54857d7d1abb98607c406b678090 (diff) | |
altoslib/altosui/altosuilib/libaltos: Remove trailing whitespace
Just cleaning up the source code.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui')
| -rw-r--r-- | altosui/AltosAscent.java | 4 | ||||
| -rw-r--r-- | altosui/AltosCompanionInfo.java | 2 | ||||
| -rw-r--r-- | altosui/AltosConfigFreqUI.java | 10 | ||||
| -rw-r--r-- | altosui/AltosConfigPyroUI.java | 14 | ||||
| -rw-r--r-- | altosui/AltosConfigTDUI.java | 4 | ||||
| -rw-r--r-- | altosui/AltosConfigureUI.java | 4 | ||||
| -rw-r--r-- | altosui/AltosDescent.java | 2 | ||||
| -rw-r--r-- | altosui/AltosDeviceUIDialog.java | 2 | ||||
| -rw-r--r-- | altosui/AltosDisplayThread.java | 2 | ||||
| -rw-r--r-- | altosui/AltosFlashUI.java | 4 | ||||
| -rw-r--r-- | altosui/AltosFlightStatsTable.java | 2 | ||||
| -rw-r--r-- | altosui/AltosFlightUI.java | 2 | ||||
| -rw-r--r-- | altosui/AltosFreqList.java | 6 | ||||
| -rw-r--r-- | altosui/AltosGraphDataPoint.java | 4 | ||||
| -rw-r--r-- | altosui/AltosGraphUI.java | 2 | ||||
| -rw-r--r-- | altosui/AltosIgniteUI.java | 2 | ||||
| -rw-r--r-- | altosui/AltosInfoTable.java | 2 | ||||
| -rw-r--r-- | altosui/AltosLanded.java | 2 | ||||
| -rw-r--r-- | altosui/AltosPad.java | 6 | ||||
| -rw-r--r-- | altosui/AltosScanUI.java | 16 | ||||
| -rw-r--r-- | altosui/AltosSiteMap.java | 2 | ||||
| -rw-r--r-- | altosui/AltosSiteMapPreload.java | 16 | ||||
| -rw-r--r-- | altosui/AltosUI.java | 6 | ||||
| -rw-r--r-- | altosui/AltosUIPreferencesBackend.java | 2 |
24 files changed, 59 insertions, 59 deletions
diff --git a/altosui/AltosAscent.java b/altosui/AltosAscent.java index 36871dd6..81b08d2c 100644 --- a/altosui/AltosAscent.java +++ b/altosui/AltosAscent.java @@ -48,7 +48,7 @@ public class AltosAscent extends JComponent implements AltosFlightDisplay { show(); value.setText(s); } - + void show(AltosUnits units, double v) { show(units.show(8, v)); } @@ -122,7 +122,7 @@ public class AltosAscent extends JComponent implements AltosFlightDisplay { show(); value.setText(s); } - + void show(AltosUnits units, double v) { show(units.show(8, v)); } diff --git a/altosui/AltosCompanionInfo.java b/altosui/AltosCompanionInfo.java index 4cc6c462..b90240fb 100644 --- a/altosui/AltosCompanionInfo.java +++ b/altosui/AltosCompanionInfo.java @@ -82,7 +82,7 @@ public class AltosCompanionInfo extends JTable { return String.format("%02x\n", companion.board_id); } } - + public void show(AltosState state, AltosListenerState listener_state) { if (state == null) return; diff --git a/altosui/AltosConfigFreqUI.java b/altosui/AltosConfigFreqUI.java index e9923a32..58778057 100644 --- a/altosui/AltosConfigFreqUI.java +++ b/altosui/AltosConfigFreqUI.java @@ -71,7 +71,7 @@ class AltosEditFreqUI extends AltosUIDialog implements ActionListener { GridBagConstraints c = new GridBagConstraints(); c.insets = new Insets (4,4,4,4); - + c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.WEST; c.gridx = 0; @@ -126,7 +126,7 @@ class AltosEditFreqUI extends AltosUIDialog implements ActionListener { c.weightx = 0; c.weighty = 0; pane.add(ok_button, c); - + cancel_button = new JButton("Cancel"); cancel_button.setActionCommand("cancel"); cancel_button.addActionListener(this); @@ -139,7 +139,7 @@ class AltosEditFreqUI extends AltosUIDialog implements ActionListener { c.weightx = 0; c.weighty = 0; pane.add(cancel_button, c); - + if (existing == null) setTitle("Add New Frequency"); else { @@ -151,7 +151,7 @@ class AltosEditFreqUI extends AltosUIDialog implements ActionListener { pack(); setLocationRelativeTo(frame); - + } public AltosEditFreqUI(Frame in_frame) { @@ -290,7 +290,7 @@ public class AltosConfigFreqUI extends AltosUIDialog implements ActionListener { public AltosFrequency[] frequencies() { return frequencies.frequencies(); } - + public AltosConfigFreqUI(Frame in_frame, AltosFrequency[] in_frequencies) { super(in_frame, "Manage Frequencies", true); diff --git a/altosui/AltosConfigPyroUI.java b/altosui/AltosConfigPyroUI.java index b14c39ab..b667b15a 100644 --- a/altosui/AltosConfigPyroUI.java +++ b/altosui/AltosConfigPyroUI.java @@ -63,22 +63,22 @@ public class AltosConfigPyroUI public void itemStateChanged(ItemEvent e) { set_enable(enable.isSelected()); - if (!setting) + if (!setting) ui.set_dirty(); } public void changedUpdate(DocumentEvent e) { - if (!setting) + if (!setting) ui.set_dirty(); } public void insertUpdate(DocumentEvent e) { - if (!setting) + if (!setting) ui.set_dirty(); } public void removeUpdate(DocumentEvent e) { - if (!setting) + if (!setting) ui.set_dirty(); } @@ -149,7 +149,7 @@ public class AltosConfigPyroUI enable = new JCheckBox(); enable.addItemListener(this); pane.add(enable, c); - + if ((flag & AltosPyro.pyro_no_value) == 0) { c = new GridBagConstraints(); c.gridx = x+1; c.gridy = y; @@ -224,7 +224,7 @@ public class AltosConfigPyroUI items = new PyroItem[nrow]; int row = 0; - + GridBagConstraints c; c = new GridBagConstraints(); c.gridx = x; c.gridy = y; @@ -371,7 +371,7 @@ public class AltosConfigPyroUI pane.add(close, c); close.addActionListener(this); close.setActionCommand("Close"); - + addWindowListener(new ConfigListener(this, owner)); AltosPreferences.register_units_listener(this); } diff --git a/altosui/AltosConfigTDUI.java b/altosui/AltosConfigTDUI.java index 3ce0d98c..55d6aed9 100644 --- a/altosui/AltosConfigTDUI.java +++ b/altosui/AltosConfigTDUI.java @@ -311,7 +311,7 @@ public class AltosConfigTDUI int i; for (i = 0; i < radio_frequency_value.getItemCount(); i++) { AltosFrequency f = (AltosFrequency) radio_frequency_value.getItemAt(i); - + if (f.close(new_radio_frequency)) { radio_frequency_value.setSelectedIndex(i); return; @@ -319,7 +319,7 @@ public class AltosConfigTDUI } for (i = 0; i < radio_frequency_value.getItemCount(); i++) { AltosFrequency f = (AltosFrequency) radio_frequency_value.getItemAt(i); - + if (new_radio_frequency < f.frequency) break; } diff --git a/altosui/AltosConfigureUI.java b/altosui/AltosConfigureUI.java index 5e42f430..631c188d 100644 --- a/altosui/AltosConfigureUI.java +++ b/altosui/AltosConfigureUI.java @@ -123,10 +123,10 @@ public class AltosConfigureUI "Bottom", "Bottom right", }; - + public void add_position() { pane.add(new JLabel ("Menu position"), constraints(0, 1)); - + position_value = new JComboBox (position_names); position_value.setMaximumRowCount(position_names.length); int position = AltosUIPreferences.position(); diff --git a/altosui/AltosDescent.java b/altosui/AltosDescent.java index d1379083..cd993a75 100644 --- a/altosui/AltosDescent.java +++ b/altosui/AltosDescent.java @@ -318,7 +318,7 @@ public class AltosDescent extends JComponent implements AltosFlightDisplay { } Distance distance; - + class Apogee extends DescentStatus { void show (AltosState state, AltosListenerState listener_state) { diff --git a/altosui/AltosDeviceUIDialog.java b/altosui/AltosDeviceUIDialog.java index ceabe843..ca34357e 100644 --- a/altosui/AltosDeviceUIDialog.java +++ b/altosui/AltosDeviceUIDialog.java @@ -46,7 +46,7 @@ public class AltosDeviceUIDialog extends AltosDeviceDialog { buttonPane.add(manage_bluetooth_button); buttonPane.add(Box.createRigidArea(new Dimension(10, 0))); } - + public void actionPerformed(ActionEvent e) { super.actionPerformed(e); if ("manage".equals(e.getActionCommand())) { diff --git a/altosui/AltosDisplayThread.java b/altosui/AltosDisplayThread.java index 2a33f996..ab85607d 100644 --- a/altosui/AltosDisplayThread.java +++ b/altosui/AltosDisplayThread.java @@ -155,7 +155,7 @@ public class AltosDisplayThread extends Thread { wait(sleep_time); } } - + report(false); } } catch (InterruptedException ie) { diff --git a/altosui/AltosFlashUI.java b/altosui/AltosFlashUI.java index 793a8af3..ff9cb95d 100644 --- a/altosui/AltosFlashUI.java +++ b/altosui/AltosFlashUI.java @@ -231,7 +231,7 @@ public class AltosFlashUI javax.swing.filechooser.FileFilter ihx_filter = new FileNameExtensionFilter("Flash Image", "ihx"); hexfile_chooser.addChoosableFileFilter(ihx_filter); hexfile_chooser.setFileFilter(ihx_filter); - + if (!is_pair_programmed() && !device.matchProduct(AltosLib.product_altusmetrum)) { for (int i = 0; i < filters.length; i++) { if (device != null && device.matchProduct(filters[i].product)) @@ -247,7 +247,7 @@ public class AltosFlashUI if (file == null) return false; AltosUIPreferences.set_firmwaredir(file.getParentFile()); - + return true; } diff --git a/altosui/AltosFlightStatsTable.java b/altosui/AltosFlightStatsTable.java index cb0c1562..da71154e 100644 --- a/altosui/AltosFlightStatsTable.java +++ b/altosui/AltosFlightStatsTable.java @@ -140,5 +140,5 @@ public class AltosFlightStatsTable extends JComponent { pos(stats.lon,"E","W")); } } - + }
\ No newline at end of file diff --git a/altosui/AltosFlightUI.java b/altosui/AltosFlightUI.java index aac4c9b0..0d21d296 100644 --- a/altosui/AltosFlightUI.java +++ b/altosui/AltosFlightUI.java @@ -226,7 +226,7 @@ public class AltosFlightUI extends AltosUIFrame implements AltosFlightDisplay, A // Telemetry format menu if (reader.supports_telemetry(Altos.ao_telemetry_standard)) { telemetries = new JComboBox(); - for (int i = 1; i <= Altos.ao_telemetry_max; i++) + for (int i = 1; i <= Altos.ao_telemetry_max; i++) telemetries.addItem(Altos.telemetry_name(i)); int telemetry = AltosPreferences.telemetry(serial); if (telemetry <= Altos.ao_telemetry_off || diff --git a/altosui/AltosFreqList.java b/altosui/AltosFreqList.java index 039b5f22..525e5ce5 100644 --- a/altosui/AltosFreqList.java +++ b/altosui/AltosFreqList.java @@ -37,7 +37,7 @@ public class AltosFreqList extends JComboBox { for (i = 0; i < getItemCount(); i++) { AltosFrequency f = (AltosFrequency) getItemAt(i); - + if (f.close(new_frequency)) { setSelectedIndex(i); return; @@ -45,7 +45,7 @@ public class AltosFreqList extends JComboBox { } for (i = 0; i < getItemCount(); i++) { AltosFrequency f = (AltosFrequency) getItemAt(i); - + if (new_frequency < f.frequency) break; } @@ -59,7 +59,7 @@ public class AltosFreqList extends JComboBox { public void set_product(String new_product) { product = new_product; } - + public void set_serial(int new_serial) { serial = new_serial; } diff --git a/altosui/AltosGraphDataPoint.java b/altosui/AltosGraphDataPoint.java index 61a1a227..e672d1bf 100644 --- a/altosui/AltosGraphDataPoint.java +++ b/altosui/AltosGraphDataPoint.java @@ -87,7 +87,7 @@ public class AltosGraphDataPoint implements AltosUIDataPoint { break; case data_gps_height: y = state.gps_height; - break; + break; case data_gps_nsat_solution: if (state.gps != null) y = state.gps.nsat; @@ -109,7 +109,7 @@ public class AltosGraphDataPoint implements AltosUIDataPoint { case data_pressure: y = state.pressure(); break; - + case data_accel_x: case data_accel_y: case data_accel_z: diff --git a/altosui/AltosGraphUI.java b/altosui/AltosGraphUI.java index 40d2f7f4..92b9b94a 100644 --- a/altosui/AltosGraphUI.java +++ b/altosui/AltosGraphUI.java @@ -16,7 +16,7 @@ import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.ui.RefineryUtilities; -public class AltosGraphUI extends AltosUIFrame +public class AltosGraphUI extends AltosUIFrame { JTabbedPane pane; AltosGraph graph; diff --git a/altosui/AltosIgniteUI.java b/altosui/AltosIgniteUI.java index 2e69249f..3028bb9c 100644 --- a/altosui/AltosIgniteUI.java +++ b/altosui/AltosIgniteUI.java @@ -486,7 +486,7 @@ public class AltosIgniteUI pane.add(close, c); close.addActionListener(this); close.setActionCommand("close"); - + pack(); setLocationRelativeTo(owner); diff --git a/altosui/AltosInfoTable.java b/altosui/AltosInfoTable.java index 158b61f0..3242d652 100644 --- a/altosui/AltosInfoTable.java +++ b/altosui/AltosInfoTable.java @@ -205,7 +205,7 @@ public class AltosInfoTable extends JTable { info_add_deg(1, "Pad longitude", state.pad_lon, 'E', 'W'); info_add_row(1, "Pad GPS alt", "%6.0f m", state.pad_alt); } - if (state.gps.year != AltosLib.MISSING) + if (state.gps.year != AltosLib.MISSING) info_add_row(1, "GPS date", "%04d-%02d-%02d", state.gps.year, state.gps.month, diff --git a/altosui/AltosLanded.java b/altosui/AltosLanded.java index 74177753..25d768ad 100644 --- a/altosui/AltosLanded.java +++ b/altosui/AltosLanded.java @@ -44,7 +44,7 @@ public class AltosLanded extends JComponent implements AltosFlightDisplay, Actio show(); value.setText(s); } - + void show(AltosUnits units, double v) { show(units.show(8, v)); } diff --git a/altosui/AltosPad.java b/altosui/AltosPad.java index 7baf0eb2..2844b32c 100644 --- a/altosui/AltosPad.java +++ b/altosui/AltosPad.java @@ -69,7 +69,7 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { public void set_label(String text) { label.setText(text); } - + public LaunchStatus (GridBagLayout layout, int y, String text) { GridBagConstraints c = new GridBagConstraints(); c.weighty = 1; @@ -142,7 +142,7 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { public void set_label(String text) { label.setText(text); } - + void reset() { value.setText(""); } @@ -414,7 +414,7 @@ public class AltosPad extends JComponent implements AltosFlightDisplay { pad_lon.set_font(); pad_alt.set_font(); } - + public void show(AltosState state, AltosListenerState listener_state) { battery.show(state, listener_state); apogee.show(state, listener_state); diff --git a/altosui/AltosScanUI.java b/altosui/AltosScanUI.java index e4a93362..419fe957 100644 --- a/altosui/AltosScanUI.java +++ b/altosui/AltosScanUI.java @@ -34,9 +34,9 @@ class AltosScanResult { int flight; AltosFrequency frequency; int telemetry; - + boolean interrupted = false; - + public String toString() { return String.format("%-9.9s serial %-4d flight %-4d (%s %s)", callsign, serial, flight, frequency.toShortString(), Altos.telemetry_name(telemetry)); @@ -76,7 +76,7 @@ class AltosScanResult { } class AltosScanResults extends LinkedList<AltosScanResult> implements ListModel { - + LinkedList<ListDataListener> listeners = new LinkedList<ListDataListener>(); void changed(ListDataEvent de) { @@ -107,7 +107,7 @@ class AltosScanResults extends LinkedList<AltosScanResult> implements ListModel public void addListDataListener(ListDataListener l) { listeners.add(l); } - + public void removeListDataListener(ListDataListener l) { listeners.remove(l); } @@ -221,12 +221,12 @@ public class AltosScanUI void set_telemetry() { reader.set_telemetry(telemetry); } - + void set_frequency() throws InterruptedException, TimeoutException { reader.set_frequency(frequencies[frequency_index].frequency); reader.reset(); } - + void next() throws InterruptedException, TimeoutException { reader.set_monitor(false); Thread.sleep(100); @@ -402,7 +402,7 @@ public class AltosScanUI scanning_label = new JLabel("Scanning:"); frequency_label = new JLabel(""); telemetry_label = new JLabel(""); - + set_label(); c.fill = GridBagConstraints.HORIZONTAL; @@ -434,7 +434,7 @@ public class AltosScanUI } int y_offset = 3 + (Altos.ao_telemetry_max - Altos.ao_telemetry_min + 1); - + list = new JList(results) { //Subclass JList to workaround bug 4832765, which can cause the //scroll pane to not let the user easily scroll up to the beginning diff --git a/altosui/AltosSiteMap.java b/altosui/AltosSiteMap.java index 105afade..643417b5 100644 --- a/altosui/AltosSiteMap.java +++ b/altosui/AltosSiteMap.java @@ -237,7 +237,7 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay { AltosSiteMapTile tile = mapTiles.get(k); tile.clearMap(); } - + centre = getBaseLocation(lat, lng); scrollRocketToVisible(pt(lat,lng)); } diff --git a/altosui/AltosSiteMapPreload.java b/altosui/AltosSiteMapPreload.java index 66399557..8380b967 100644 --- a/altosui/AltosSiteMapPreload.java +++ b/altosui/AltosSiteMapPreload.java @@ -178,7 +178,7 @@ class AltosSites extends Thread { try { URLConnection uc = url.openConnection(); //int length = uc.getContentLength(); - + InputStreamReader in_stream = new InputStreamReader(uc.getInputStream(), Altos.unicode_set); BufferedReader in = new BufferedReader(in_stream); @@ -222,7 +222,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener AltosSites sites; JLabel site_list_label; JComboBox site_list; - + JToggleButton load_button; boolean loading; JButton close_button; @@ -347,7 +347,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener pbar.setValue(0); pbar.setString(""); pbar.setStringPainted(true); - + c.fill = GridBagConstraints.HORIZONTAL; c.anchor = GridBagConstraints.CENTER; c.insets = i; @@ -373,7 +373,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener c.gridwidth = 1; pane.add(site_list_label, c); - + site_list = new JComboBox(new String[] { "Site List" }); site_list.addItemListener(this); @@ -390,7 +390,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener c.gridwidth = 1; pane.add(site_list, c); - + lat = new AltosMapPos(owner, "Latitude:", lat_hemi_names, @@ -407,7 +407,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener c.anchor = GridBagConstraints.CENTER; pane.add(lat, c); - + lon = new AltosMapPos(owner, "Longitude:", lon_hemi_names, @@ -429,7 +429,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener load_button = new JToggleButton("Load Map"); load_button.addActionListener(this); load_button.setActionCommand("load"); - + c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.CENTER; c.insets = i; @@ -446,7 +446,7 @@ public class AltosSiteMapPreload extends AltosUIDialog implements ActionListener close_button = new JButton("Close"); close_button.addActionListener(this); close_button.setActionCommand("close"); - + c.fill = GridBagConstraints.NONE; c.anchor = GridBagConstraints.CENTER; c.insets = i; diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 5d459947..a1bc83bf 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -233,7 +233,7 @@ public class AltosUI extends AltosUIFrame { }); setLocationByPlatform(false); - + /* Insets aren't set before the window is visible */ setVisible(true); } @@ -468,7 +468,7 @@ public class AltosUI extends AltosUIFrame { } return false; } - + static boolean process_summary(File file) { AltosStateIterable states = record_iterable(file); if (states == null) @@ -547,7 +547,7 @@ public class AltosUI extends AltosUIFrame { System.out.printf(" --kml\tgenerate KML output for use with Google Earth\n"); System.exit(code); } - + public static void main(final String[] args) { int errors = 0; load_library(null); diff --git a/altosui/AltosUIPreferencesBackend.java b/altosui/AltosUIPreferencesBackend.java index 697d9902..f85735e8 100644 --- a/altosui/AltosUIPreferencesBackend.java +++ b/altosui/AltosUIPreferencesBackend.java @@ -25,7 +25,7 @@ import javax.swing.filechooser.FileSystemView; public class AltosUIPreferencesBackend implements AltosPreferencesBackend { private Preferences _preferences = null; - + public AltosUIPreferencesBackend() { _preferences = Preferences.userRoot().node("/org/altusmetrum/altosui"); } |
