Bug 214572 Implement IAggregationCellViewProvider for crosstab/chart integration
This interface implements the model logic for the designer UI, when the users design a crosstab with charts. Note that it is independent from the multi-view feature. /** * Return the name of this view */ String getViewName( ); // this should simply return "chart" /** * Returns if the given aggregation cell matches this view */ boolean matchView( AggregationCellHandle cell ); Returns true if chart is supported in this type of aggregation cell /** * Switches given aggregation cell to this view */ void switchView( AggregationCellHandle cell ); create a chart inside the aggregation cell (and remove the data elements). This method is called when the UI tries to switch the cell contents from data element to chart. /** * Restores given aggregation cell to previous view */ void restoreView( AggregationCellHandle cell );
chart/org.eclipse.birt.chart.reportitem/src/org/eclipse/birt/chart/reportitem/ChartReportItemImpl.java
import org.eclipse.birt.chart.model.attribute.NumberFormatSpecifier;
import org.eclipse.birt.chart.model.attribute.Position;
import org.eclipse.birt.chart.model.component.Axis;
import org.eclipse.birt.chart.model.data.SeriesDefinition;
import org.eclipse.birt.chart.model.impl.SerializerImpl;
import org.eclipse.birt.chart.reportitem.i18n.Messages;
import org.eclipse.birt.chart.reportitem.plugin.ChartReportItemPlugin;
import org.eclipse.birt.chart.script.IChartEventHandler;
import org.eclipse.birt.chart.script.internal.ChartWithAxesImpl;
import org.eclipse.birt.chart.script.internal.ChartWithoutAxesImpl;
import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.ExtendedItemHandle;
import org.eclipse.birt.report.model.api.PropertyHandle;
import org.eclipse.birt.report.model.api.extension.ExtendedElementException;
import org.eclipse.birt.report.model.api.extension.IChoiceDefinition;
import org.eclipse.birt.report.model.api.extension.ICompatibleReportItem;
import org.eclipse.birt.report.model.api.extension.IElementCommand;
import org.eclipse.birt.report.model.api.extension.IPropertyDefinition;
import org.eclipse.birt.report.model.api.extension.IReportItem;
import org.eclipse.birt.report.model.api.extension.ReportItem;
import org.eclipse.birt.report.model.api.metadata.IMethodInfo;
import org.eclipse.birt.report.model.api.metadata.IPropertyType;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.RhinoException;
/**
 * ChartReportItemImpl
 */
public final class ChartReportItemImpl extends ReportItem