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