Example #1
0
 /** Builds a BarChartGenerator and attaches it as a display in a MASON simulation. */
 public static BarChartGenerator buildBarChartGenerator(GUIState state, String title) {
   BarChartGenerator chart = buildBarChartGenerator(title);
   JFrame frame = chart.createFrame();
   frame.setVisible(true);
   frame.pack();
   state.controller.registerFrame(frame);
   return chart;
 }
Example #2
0
 /** Adds a series to the BarChartGenerator. */
 public static BarChartSeriesAttributes addSeries(
     final BarChartGenerator chart, String seriesName) {
   return (BarChartSeriesAttributes)
       (chart.addSeries(new double[0], new String[0], seriesName, null));
 }
Example #3
0
 /** Builds a BarChartGenerator not attached to any MASON simulation. */
 public static BarChartGenerator buildBarChartGenerator(String title) {
   BarChartGenerator chart = new BarChartGenerator();
   if (title == null) title = "";
   chart.setTitle(title);
   return chart;
 }