diff options
| author | Keith Packard <keithp@keithp.com> | 2012-12-31 14:17:26 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2012-12-31 14:17:26 -0800 | 
| commit | 2bd6aca54fc465995d6985c8799cd0d016c9a543 (patch) | |
| tree | 86837459a95308ae286d2b8bae4d9e0e20e6d37f /micropeak/MicroPeak.java | |
| parent | 56a1210a7b04a3623d19ec282f26fecc79c126dd (diff) | |
micropeak: Add flight stats pane
Shows graph or stats in alternate panes
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'micropeak/MicroPeak.java')
| -rw-r--r-- | micropeak/MicroPeak.java | 15 | 
1 files changed, 12 insertions, 3 deletions
| diff --git a/micropeak/MicroPeak.java b/micropeak/MicroPeak.java index 463238c8..c69f7167 100644 --- a/micropeak/MicroPeak.java +++ b/micropeak/MicroPeak.java @@ -30,13 +30,16 @@ public class MicroPeak extends MicroFrame implements ActionListener, ItemListene  	File		filename;  	MicroGraph	graph; +	MicroStatsTable	stats;  	MicroData	data; -	Container	pane; +	Container	container; +	JTabbedPane	pane;  	private void RunFile(InputStream input) {  		try {  			data = new MicroData(input);  			graph.setData(data); +			stats.setData(data);  		} catch (IOException ioe) {  		}  		try { @@ -90,7 +93,8 @@ public class MicroPeak extends MicroFrame implements ActionListener, ItemListene  		AltosUIPreferences.set_component(this); -		pane = getContentPane(); +		container = getContentPane(); +		pane = new JTabbedPane();  		setTitle("MicroPeak"); @@ -129,9 +133,14 @@ public class MicroPeak extends MicroFrame implements ActionListener, ItemListene  		});  		graph = new MicroGraph(); -		pane.add(graph.panel); +		stats = new MicroStatsTable(); +		pane.add(graph.panel, "Graph"); +		pane.add(stats, "Statistics");  		pane.doLayout();  		pane.validate(); +		container.add(pane); +		container.doLayout(); +		container.validate();  		doLayout();  		validate();  		Insets i = getInsets(); | 
