Package org.jfree.data.general

Examples of org.jfree.data.general.Dataset


      super.encodeEnd(context);

      UIChart chart = (UIChart) findITextParent(getParent(), UIChart.class);
      if (chart != null)
      {
         Dataset dataset = chart.getDataset();

         if (dataset instanceof DefaultPieDataset)
         {
            DefaultPieDataset piedata = (DefaultPieDataset) dataset;
            piedata.setValue(getKey(), getNumericValue());

            PiePlot plot = (PiePlot) chart.getChart().getPlot();

            if (getExplodedPercent() != null)
            {
               plot.setExplodePercent(getKey(), getExplodedPercent());
            }

            if (UIChart.findColor(getSectionPaint()) != null)
            {
               plot.setSectionPaint(getKey(), UIChart.findColor(getSectionPaint()));
            }

            if (UIChart.findColor(getSectionOutlinePaint()) != null)
            {
               plot.setSectionOutlinePaint(getKey(), UIChart.findColor(getSectionOutlinePaint()));
            }

            if (UIChart.findStroke(getSectionOutlineStroke()) != null)
            {
               plot.setSectionOutlineStroke(getKey(), UIChart.findStroke(getSectionOutlineStroke()));
            }
         }
         else if (dataset instanceof DefaultCategoryDataset)
         {
            DefaultCategoryDataset data = (DefaultCategoryDataset) dataset;

            // CategoryPlot plot = (CategoryPlot) chart.getChart().getPlot();
            data.addValue(getNumericValue(), getSeries(), getKey());
         }
         else
         {
            throw new RuntimeException("Cannot add data to dataset of type " + dataset.getClass());
         }
      }
   }
View Full Code Here


                axis.addChangeListener(this);
            }
        }
        int datasetCount = this.datasets.size();
        for (int i = 0; i < datasetCount; i++) {
            Dataset dataset = this.datasets.get(i);
            if (dataset != null) {
                dataset.addChangeListener(this);
            }
        }
        int rendererCount = this.renderers.size();
        for (int i = 0; i < rendererCount; i++) {
            PolarItemRenderer renderer = this.renderers.get(i);
View Full Code Here

                axis.addChangeListener(this);
            }
        }
        int datasetCount = this.datasets.size();
        for (int i = 0; i < datasetCount; i++) {
            Dataset dataset = (Dataset) this.datasets.get(i);
            if (dataset != null) {
                dataset.addChangeListener(this);
            }
        }
        int rendererCount = this.renderers.size();
        for (int i = 0; i < rendererCount; i++) {
            XYItemRenderer renderer = (XYItemRenderer) this.renderers.get(i);
View Full Code Here

                yAxis.addChangeListener(this);
            }
        }
        int datasetCount = this.datasets.size();
        for (int i = 0; i < datasetCount; i++) {
            Dataset dataset = (Dataset) this.datasets.get(i);
            if (dataset != null) {
                dataset.addChangeListener(this);
            }
        }
        int rendererCount = this.renderers.size();
        for (int i = 0; i < rendererCount; i++) {
            CategoryItemRenderer renderer
View Full Code Here

TOP

Related Classes of org.jfree.data.general.Dataset

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.