Beispiel #1
0
 /**
  * Walks down the series definition tree and removes all runtime series.
  *
  * @param elSDs
  * @param al
  * @param iLevel
  */
 private static final void recursivelyRemoveRuntimeSeries(
     EList<SeriesDefinition> elSDs, int iLevel, int iLevelToOmit) {
   for (int i = 0; i < elSDs.size(); i++) {
     SeriesDefinition sd = elSDs.get(i);
     if (iLevel != iLevelToOmit) {
       if (sd.getSeries().size() == sd.getRunTimeSeries().size()) {
         for (Series se : sd.getRunTimeSeries()) {
           se.getDataSets().clear();
         }
       } else {
         sd.getSeries().removeAll(sd.getRunTimeSeries());
       }
     }
     recursivelyRemoveRuntimeSeries(sd.getSeriesDefinitions(), iLevel + 1, iLevelToOmit);
   }
 }
Beispiel #2
0
 /*
  * (non-Javadoc)
  *
  * @see org.eclipse.birt.chart.model.Chart#clearSections(int)
  */
 public final void clearSections(int iSectionType) {
   if ((iSectionType & IConstants.RUN_TIME) == IConstants.RUN_TIME) {
     recursivelyRemoveRuntimeSeries(getSeriesDefinitions(), 0, -1);
   }
 }