diff options
| author | Keith Packard <keithp@keithp.com> | 2013-01-03 17:31:01 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2013-01-03 17:31:01 -0800 | 
| commit | f20781010a6560b7b359af269c502d098917c446 (patch) | |
| tree | aeb9db1b1e4b9597609488b4918676551c75aad5 /micropeak/MicroFileChooser.java | |
| parent | 36e9603f74b85776ac049758021b51909161aeb1 (diff) | |
micropeak: Add command line export option
micropeak --export <foo.mpd> will create <foo.csv> full of useful data.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'micropeak/MicroFileChooser.java')
| -rw-r--r-- | micropeak/MicroFileChooser.java | 18 | 
1 files changed, 3 insertions, 15 deletions
| diff --git a/micropeak/MicroFileChooser.java b/micropeak/MicroFileChooser.java index d2540987..21ddb0f8 100644 --- a/micropeak/MicroFileChooser.java +++ b/micropeak/MicroFileChooser.java @@ -36,24 +36,12 @@ public class MicroFileChooser extends JFileChooser {  		return file;  	} -	public InputStream runDialog() { +	public File runDialog() {  		int	ret;  		ret = showOpenDialog(frame); -		if (ret == APPROVE_OPTION) { -			file = getSelectedFile(); -			if (file == null) -				return null; -			filename = file.getName(); -			try { -				return new FileInputStream(file); -			} catch (FileNotFoundException fe) { -				JOptionPane.showMessageDialog(frame, -							      fe.getMessage(), -							      "Cannot open file", -							      JOptionPane.ERROR_MESSAGE); -			} -		} +		if (ret == APPROVE_OPTION) +			return getSelectedFile();  		return null;  	} | 
