added standard_frames convenience;
authorwenzelm
Wed, 02 Jan 2013 21:55:57 +0100
changeset 5170620beafe66748
parent 51705 03c4d75e8e32
child 51707 97f951edca46
added standard_frames convenience;
src/Pure/ML/ml_statistics.scala
     1.1 --- a/src/Pure/ML/ml_statistics.scala	Wed Jan 02 21:39:54 2013 +0100
     1.2 +++ b/src/Pure/ML/ml_statistics.scala	Wed Jan 02 21:55:57 2013 +0100
     1.3 @@ -8,6 +8,7 @@
     1.4  
     1.5  
     1.6  import scala.collection.immutable.{SortedSet, SortedMap}
     1.7 +import scala.swing.{Frame, Component}
     1.8  
     1.9  import org.jfree.data.xy.{XYSeries, XYSeriesCollection}
    1.10  import org.jfree.chart.{JFreeChart, ChartPanel, ChartFactory}
    1.11 @@ -126,5 +127,13 @@
    1.12  
    1.13    def chart_panel(title: String, selected_fields: Iterable[String]): ChartPanel =
    1.14      new ChartPanel(chart(title, selected_fields))
    1.15 +
    1.16 +  def standard_frames: Unit =
    1.17 +    for ((title, selected_fields) <- ML_Statistics.standard_fields) {
    1.18 +      val c = chart(title, selected_fields)
    1.19 +      Swing_Thread.later {
    1.20 +        new Frame { contents = Component.wrap(new ChartPanel(c)); visible = true }
    1.21 +      }
    1.22 +    }
    1.23  }
    1.24