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