# HG changeset patch # User wenzelm # Date 1357160157 -3600 # Node ID 20beafe66748568a5207ac0919c467ff75c90e36 # Parent 03c4d75e8e32e10d829eca1b39364cf1e9013c3b added standard_frames convenience; diff -r 03c4d75e8e32 -r 20beafe66748 src/Pure/ML/ml_statistics.scala --- a/src/Pure/ML/ml_statistics.scala Wed Jan 02 21:39:54 2013 +0100 +++ b/src/Pure/ML/ml_statistics.scala Wed Jan 02 21:55:57 2013 +0100 @@ -8,6 +8,7 @@ import scala.collection.immutable.{SortedSet, SortedMap} +import scala.swing.{Frame, Component} import org.jfree.data.xy.{XYSeries, XYSeriesCollection} import org.jfree.chart.{JFreeChart, ChartPanel, ChartFactory} @@ -126,5 +127,13 @@ def chart_panel(title: String, selected_fields: Iterable[String]): ChartPanel = new ChartPanel(chart(title, selected_fields)) + + def standard_frames: Unit = + for ((title, selected_fields) <- ML_Statistics.standard_fields) { + val c = chart(title, selected_fields) + Swing_Thread.later { + new Frame { contents = Component.wrap(new ChartPanel(c)); visible = true } + } + } }