Search in sources :

Example 1 with DataSampleTable

use of org.talend.dataquality.record.linkage.ui.composite.table.DataSampleTable in project tdq-studio-se by Talend.

the class MatchAnalysisDetailsPage method createDataTableComposite.

/**
 * create DataTable Composite.
 *
 * @param dataparent
 */
private void createDataTableComposite(Composite dataparent) {
    dataTableComp = toolkit.createComposite(dataparent);
    GridLayout dataTableLayout = new GridLayout(1, Boolean.TRUE);
    dataTableComp.setLayout(dataTableLayout);
    GridData gridData = new GridData(GridData.FILL_BOTH);
    gridData.heightHint = 250;
    dataTableComp.setLayoutData(gridData);
    sampleTable = new DataSampleTable();
    // use handler to save selected columns
    ModelElement[] selectedColumns = getSelectedColumnsFromHandler();
    if (selectedColumns != null && selectedColumns.length > 0) {
        // use ModelElement instead of node to get the data source type directly.
        if (selectedColumns[0] instanceof MetadataColumn && !(selectedColumns[0] instanceof TdColumn)) {
            isDelimitedFile = true;
        }
        createNatTable(new ArrayList<Object[]>());
    }
    sampleTable.addPropertyChangeListener(this);
}
Also used : ModelElement(orgomg.cwm.objectmodel.core.ModelElement) MetadataColumn(org.talend.core.model.metadata.builder.connection.MetadataColumn) GridLayout(org.eclipse.swt.layout.GridLayout) DataSampleTable(org.talend.dataquality.record.linkage.ui.composite.table.DataSampleTable) TdColumn(org.talend.cwm.relational.TdColumn) GridData(org.eclipse.swt.layout.GridData)

Aggregations

GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 MetadataColumn (org.talend.core.model.metadata.builder.connection.MetadataColumn)1 TdColumn (org.talend.cwm.relational.TdColumn)1 DataSampleTable (org.talend.dataquality.record.linkage.ui.composite.table.DataSampleTable)1 ModelElement (orgomg.cwm.objectmodel.core.ModelElement)1