Exemplo 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;
 }
Exemplo 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));
 }
Exemplo 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;
 }