Search in sources :

Example 6 with DynamicChartEventReceiver

use of org.talend.dataprofiler.core.ui.events.DynamicChartEventReceiver in project tdq-studio-se by Talend.

the class BusinessRuleAnalysisResultPage method unRegisterDynamicEvent.

/**
 * unregister every dynamic events which registered before executing analysis
 *
 * @param eventReceivers
 */
public void unRegisterDynamicEvent() {
    // Added TDQ-9241
    EventManager.getInstance().clearEvent(masterPage.getCurrentModelElement(), EventEnum.DQ_DYNAMIC_SWITCH_MASTER_RESULT_PAGE);
    for (Indicator oneIndicator : eventReceivers.keySet()) {
        DynamicChartEventReceiver eventReceiver = (DynamicChartEventReceiver) eventReceivers.get(oneIndicator);
        eventReceiver.clear();
        EventManager.getInstance().clearEvent(oneIndicator, EventEnum.DQ_DYMANIC_CHART);
    }
    eventReceivers.clear();
    EventManager.getInstance().clearEvent(sectionClient, EventEnum.DQ_DYNAMIC_REFRESH_DYNAMIC_CHART);
    for (DynamicIndicatorModel dyModel : dynamicList) {
        dyModel.clear();
    }
    dynamicList.clear();
    masterPage.clearDynamicDatasets();
}
Also used : TableDynamicChartEventReceiver(org.talend.dataprofiler.core.ui.events.TableDynamicChartEventReceiver) DynamicChartEventReceiver(org.talend.dataprofiler.core.ui.events.DynamicChartEventReceiver) DynamicIndicatorModel(org.talend.dataprofiler.core.model.dynamic.DynamicIndicatorModel) CompositeIndicator(org.talend.dataprofiler.core.ui.editor.preview.CompositeIndicator) Indicator(org.talend.dataquality.indicators.Indicator) TableIndicator(org.talend.dataprofiler.core.model.TableIndicator)

Example 7 with DynamicChartEventReceiver

use of org.talend.dataprofiler.core.ui.events.DynamicChartEventReceiver 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();
}
Also used : DynamicChartEventReceiver(org.talend.dataprofiler.core.ui.events.DynamicChartEventReceiver) DynamicIndicatorModel(org.talend.dataprofiler.core.model.dynamic.DynamicIndicatorModel) Indicator(org.talend.dataquality.indicators.Indicator) DynamicBAWChartEventReceiver(org.talend.dataprofiler.core.ui.events.DynamicBAWChartEventReceiver)

Example 8 with DynamicChartEventReceiver

use of org.talend.dataprofiler.core.ui.events.DynamicChartEventReceiver in project tdq-studio-se by Talend.

the class DynamicAnalysisMasterPage method unRegisterDynamicEvent.

/**
 * unregister every dynamic events which registered before executing analysis
 *
 * @param eventReceivers
 */
public void unRegisterDynamicEvent() {
    EventManager.getInstance().clearEvent(getCurrentModelElement(), EventEnum.DQ_DYNAMIC_SWITCH_MASTER_RESULT_PAGE);
    for (Indicator oneIndicator : eventReceivers.keySet()) {
        DynamicChartEventReceiver eventReceiver = (DynamicChartEventReceiver) eventReceivers.get(oneIndicator);
        eventReceiver.clear();
        EventManager.getInstance().clearEvent(oneIndicator, EventEnum.DQ_DYMANIC_CHART);
    }
    eventReceivers.clear();
    EventManager.getInstance().clearEvent(chartComposite, EventEnum.DQ_DYNAMIC_REFRESH_DYNAMIC_CHART);
    clearDynamicDatasets();
}
Also used : DynamicChartEventReceiver(org.talend.dataprofiler.core.ui.events.DynamicChartEventReceiver) Indicator(org.talend.dataquality.indicators.Indicator)

Aggregations

DynamicChartEventReceiver (org.talend.dataprofiler.core.ui.events.DynamicChartEventReceiver)8 Indicator (org.talend.dataquality.indicators.Indicator)7 DynamicIndicatorModel (org.talend.dataprofiler.core.model.dynamic.DynamicIndicatorModel)4 ModelElementIndicator (org.talend.dataprofiler.core.model.ModelElementIndicator)3 DynamicBAWChartEventReceiver (org.talend.dataprofiler.core.ui.events.DynamicBAWChartEventReceiver)3 CompositeIndicator (org.talend.dataprofiler.core.ui.editor.preview.CompositeIndicator)2 BenfordFrequencyDynamicChartEventReceiver (org.talend.dataprofiler.core.ui.events.BenfordFrequencyDynamicChartEventReceiver)2 FrequencyDynamicChartEventReceiver (org.talend.dataprofiler.core.ui.events.FrequencyDynamicChartEventReceiver)2 PatternDynamicChartEventReceiver (org.talend.dataprofiler.core.ui.events.PatternDynamicChartEventReceiver)2 TableViewer (org.eclipse.jface.viewers.TableViewer)1 TableIndicator (org.talend.dataprofiler.core.model.TableIndicator)1 CustomerDefaultBAWDataset (org.talend.dataprofiler.core.ui.editor.preview.model.dataset.CustomerDefaultBAWDataset)1 IChartTypeStates (org.talend.dataprofiler.core.ui.editor.preview.model.states.IChartTypeStates)1 PatternStatisticsState (org.talend.dataprofiler.core.ui.editor.preview.model.states.pattern.PatternStatisticsState)1 IEventReceiver (org.talend.dataprofiler.core.ui.events.IEventReceiver)1 TableDynamicChartEventReceiver (org.talend.dataprofiler.core.ui.events.TableDynamicChartEventReceiver)1