Example #1
0
 /** Builds a TimeSeriesChartGenerator not attached to any MASON simulation. */
 public static TimeSeriesChartGenerator buildTimeSeriesChartGenerator(
     String title, String domainAxisLabel) {
   TimeSeriesChartGenerator chart = new TimeSeriesChartGenerator();
   if (title == null) title = "";
   chart.setTitle(title);
   if (domainAxisLabel == null) domainAxisLabel = "";
   chart.setXAxisLabel(domainAxisLabel);
   return chart;
 }
Example #2
0
 /** Builds a TimeSeriesChartGenerator and attaches it as a display in a MASON simulation. */
 public static TimeSeriesChartGenerator buildTimeSeriesChartGenerator(
     GUIState state, String title, String domainAxisLabel) {
   TimeSeriesChartGenerator chart = buildTimeSeriesChartGenerator(title, domainAxisLabel);
   JFrame frame = chart.createFrame();
   frame.setVisible(true);
   frame.pack();
   state.controller.registerFrame(frame);
   return chart;
 }
Example #3
0
 /** Adds a series to the TimeSeriesChartGenerator */
 public static TimeSeriesAttributes addSeries(
     final TimeSeriesChartGenerator chart, String seriesName) {
   final XYSeries series =
       new XYSeries(seriesName /* not sure if this has to be unique any more */, false);
   return (TimeSeriesAttributes) (chart.addSeries(series, null));
 }