use of org.talend.dataprofiler.core.ui.editor.preview.ColumnSetIndicatorUnit in project tdq-studio-se by Talend.
the class ColumnSetAnalysisResultPage method createAllMatchPart.
private Section createAllMatchPart(Composite parentComp, String title, AllMatchIndicator matchIndicator) {
Section section = createSection(form, parentComp, title, null);
section.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite sectionClient = toolkit.createComposite(section);
sectionClient.setLayout(new GridLayout(2, false));
sectionClient.setLayoutData(new GridData(GridData.FILL_BOTH));
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.TOP).applyTo(sectionClient);
List<IndicatorUnit> units = new ArrayList<IndicatorUnit>();
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.AllMatchIndicatorEnum, allMatchIndicator));
EIndicatorChartType matchingType = EIndicatorChartType.PATTERN_MATCHING;
ITableTypeStates tableTypeState = TableTypeStatesFactory.getInstance().getTableState(matchingType, units);
TableWithData chartData = new TableWithData(matchingType, tableTypeState.getDataEntity());
TableViewer tableviewer = tableTypeState.getTableForm(sectionClient);
tableviewer.setInput(chartData);
// MOD qiongli feature 19192.
if (masterPage.getCurrentModelElement().getParameters().isStoreData()) {
ChartTableFactory.addMenuAndTip(tableviewer, tableTypeState.getDataExplorer(), masterPage.getCurrentModelElement());
} else {
TableUtils.addTooltipForTable(tableviewer.getTable());
TableUtils.addActionTooltip(tableviewer.getTable());
}
if (canShowChartForResultPage()) {
IChartTypeStates chartTypeState = ChartTypeStatesFactory.getChartState(matchingType, units);
Object chart = chartTypeState.getChart();
TOPChartUtils.getInstance().decorateChart(chart, false);
if (chart != null) {
TOPChartUtils.getInstance().createChartComposite(sectionClient, SWT.NONE, chart, true);
}
}
section.setClient(sectionClient);
return section;
}
use of org.talend.dataprofiler.core.ui.editor.preview.ColumnSetIndicatorUnit in project tdq-studio-se by Talend.
the class PatternStatisticsStateTest method setUp.
/**
* init the state.
*
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception {
List<IndicatorUnit> units = new ArrayList<IndicatorUnit>();
RegexpMatchingIndicator indicator = IndicatorsFactory.eINSTANCE.createRegexpMatchingIndicator();
// $NON-NLS-1$
indicator.setName("Blank text");
indicator.setComputed(true);
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.AllMatchIndicatorEnum, indicator));
patternStatisticsState = new PatternStatisticsState(units);
}
use of org.talend.dataprofiler.core.ui.editor.preview.ColumnSetIndicatorUnit in project tdq-studio-se by Talend.
the class IndicatorsComp method openIndicatorOptionDialog.
public boolean openIndicatorOptionDialog(Shell shell, TreeItem indicatorItem) {
if (isDirty()) {
masterPage.doSave(null);
}
ColumnSetIndicatorUnit indicatorUnit = (ColumnSetIndicatorUnit) indicatorItem.getData(INDICATOR_KEY);
if (indicatorUnit.isExsitingForm()) {
IndicatorOptionsWizard wizard = new IndicatorOptionsWizard(indicatorUnit);
String href = FormEnum.getFirstFormHelpHref(indicatorUnit);
OpeningHelpWizardDialog optionDialog = new OpeningHelpWizardDialog(shell, wizard, href);
if (Window.OK == optionDialog.open()) {
masterPage.setDirty(wizard.isDirty());
return hasIndicatorParameters(indicatorUnit.getIndicator());
}
} else {
// $NON-NLS-1$
MessageDialogWithToggle.openInformation(// $NON-NLS-1$
shell, // $NON-NLS-1$
DefaultMessagesImpl.getString("AnalysisColumnTreeViewer.information"), // $NON-NLS-1$
DefaultMessagesImpl.getString("AnalysisColumnTreeViewer.nooption"));
}
return false;
}
Aggregations