use of org.talend.dataprofiler.core.ui.events.DynamicBAWChartEventReceiver in project tdq-studio-se by Talend.
the class ColumnAnalysisResultPage method registerDynamicEvent.
/**
* Added TDQ-8787 20140613 yyin: create all charts before running, register each chart with its related indicator.
*/
public void registerDynamicEvent() {
// get all indicators and datasets
List<DynamicIndicatorModel> indiAndDatasets = uiPagination.getAllIndcatorAndDatasetOfCurrentPage();
// register dynamic event,for the indicator (for each column)
for (DynamicIndicatorModel oneCategoryIndicatorModel : indiAndDatasets) {
TableViewer tableViewer = oneCategoryIndicatorModel.getTableViewer();
if (EIndicatorChartType.SUMMARY_STATISTICS.equals(oneCategoryIndicatorModel.getChartType())) {
// when all/not-all summary indicators are selected
DynamicBAWChartEventReceiver bawReceiver = AnalysisUtils.createDynamicBAWChartEventReceiver(oneCategoryIndicatorModel, eventReceivers);
bawReceiver.setChartComposite(chartComposite);
bawReceiver.setParentChartComposite((Composite) oneCategoryIndicatorModel.getBawParentChartComp());
bawReceiver.refreshChart();
bawReceiver.setTableViewer(tableViewer);
// no need to register the parent baw receiver with one of summary indicator, no need to handle baw
// actually
} else {
int index = 0;
for (Indicator oneIndicator : oneCategoryIndicatorModel.getIndicatorList()) {
DynamicChartEventReceiver eReceiver = AnalysisUtils.createDynamicChartEventReceiver(oneCategoryIndicatorModel, index++, oneIndicator);
eReceiver.setChartComposite(chartComposite);
eReceiver.refreshChart();
eReceiver.setTableViewer(tableViewer);
// clear data
eReceiver.clearValue();
registerIndicatorEvent(oneIndicator, eReceiver);
}
}
}
reLayoutChartComposite();
registerOtherDynamicEvent();
}
use of org.talend.dataprofiler.core.ui.events.DynamicBAWChartEventReceiver in project tdq-studio-se by Talend.
the class AnalysisUtils method createDynamicBAWChartEventReceiver.
/**
* DOC yyin Comment method "createDynamicBAWChartEventReceiver".
*
* @param oneCategoryIndicatorModel
* @param categoryDataset
* @return
*/
public static DynamicBAWChartEventReceiver createDynamicBAWChartEventReceiver(DynamicIndicatorModel oneCategoryIndicatorModel, Map<Indicator, EventReceiver> eventReceivers) {
DynamicBAWChartEventReceiver bawReceiver = new DynamicBAWChartEventReceiver();
Object categoryDataset = oneCategoryIndicatorModel.getDataset();
if (categoryDataset instanceof CustomerDefaultBAWDataset) {
// all summary selected
bawReceiver.setBawDataset((CustomerDefaultBAWDataset) categoryDataset);
} else {
// not-all summary selected
bawReceiver.setDataset(categoryDataset);
}
bawReceiver.setBAWparentComposite(oneCategoryIndicatorModel.getBawParentChartComp());
bawReceiver.setTableViewer(oneCategoryIndicatorModel.getTableViewer());
int index = 0;
int length = oneCategoryIndicatorModel.getSummaryIndicators().size();
for (Indicator oneIndicator : oneCategoryIndicatorModel.getSummaryIndicators()) {
DynamicChartEventReceiver eReceiver = bawReceiver.createEventReceiver(IndicatorEnum.findIndicatorEnum(oneIndicator.eClass()), oneIndicator);
eReceiver.setTableViewer(oneCategoryIndicatorModel.getTableViewer());
eReceiver.setEntityIndex(index++);
if (SummaryStatisticsState.FULL_FLAG != length) {
eReceiver.setDataset(categoryDataset);
}
eReceiver.clearValue();
eventReceivers.put(oneIndicator, eReceiver);
EventManager.getInstance().register(oneIndicator, EventEnum.DQ_DYMANIC_CHART, eReceiver);
}
bawReceiver.clearValue();
return bawReceiver;
}
use of org.talend.dataprofiler.core.ui.events.DynamicBAWChartEventReceiver in project tdq-studio-se by Talend.
the class DynamicAnalysisMasterPage method registerDynamicEvent.
/**
* Added TDQ-8787 20140613 yyin: create all charts before running, register each chart with its related indicator.
*/
public void registerDynamicEvent() {
// only worked for the analysis which support dynamic chart
// create all charts for related indicator in current page
createDynamicChartsBeforeRun();
// get all indicators and datasets
List<DynamicIndicatorModel> indiAndDatasets = getDynamicDatasets();
// register dynamic event,for the indicator (for each column)
for (DynamicIndicatorModel oneCategoryIndicatorModel : indiAndDatasets) {
if (EIndicatorChartType.SUMMARY_STATISTICS.equals(oneCategoryIndicatorModel.getChartType())) {
// when all summary indicators are selected
DynamicBAWChartEventReceiver bawReceiver = AnalysisUtils.createDynamicBAWChartEventReceiver(oneCategoryIndicatorModel, eventReceivers);
bawReceiver.setChartComposite(chartComposite);
// no need to register the parent baw receiver with one of summary indicator, no need to handle baw
// actually
} else {
int index = 0;
for (Indicator oneIndicator : oneCategoryIndicatorModel.getIndicatorList()) {
// if the indicator is a frequency indicator, create a Frequency Event Receiver
DynamicChartEventReceiver eReceiver = createEventReceiver(oneCategoryIndicatorModel, index++, oneIndicator);
eReceiver.setChartComposite(chartComposite);
// clear data
eReceiver.clearValue();
registerIndicatorEvent(oneIndicator, eReceiver);
}
}
}
reLayoutChartComposite();
registerOtherDynamicEvent();
}
Aggregations