Search in sources :

Example 1 with AbstractPagePart

use of org.talend.dataprofiler.core.ui.editor.composite.AbstractPagePart in project tdq-studio-se by Talend.

the class BusinessRuleAnalysisResultPage method createResultSection.

@Override
protected void createResultSection(Composite parent) {
    // ADD gdbu 2011-3-4 bug 19242
    AbstractPagePart treeViewer = masterPage.getTreeViewer();
    if (treeViewer != null && treeViewer instanceof AnalysisTableTreeViewer) {
        tableTreeViewer = (AnalysisTableTreeViewer) treeViewer;
    }
    // ~
    // $NON-NLS-1$
    resultSection = createSection(form, parent, DefaultMessagesImpl.getString("TableAnalysisResultPage.analysisResult"), null);
    sectionClient = toolkit.createComposite(resultSection);
    sectionClient.setLayout(new GridLayout());
    sectionClient.setLayoutData(new GridData(GridData.FILL_BOTH));
    dynamicList.clear();
    for (final TableIndicator tableIndicator : tableTreeViewer.getTableIndicator()) {
        ExpandableComposite exComp = toolkit.createExpandableComposite(sectionClient, ExpandableComposite.TWISTIE | ExpandableComposite.CLIENT_INDENT | ExpandableComposite.EXPANDED);
        // bug 10541 fix by zshen,Change some character set to be proper to add view in the table anasys
        if (tableIndicator.isTable()) {
            exComp.setText(DefaultMessagesImpl.getString("TableAnalysisResultPage.table", // $NON-NLS-1$
            tableIndicator.getColumnSet().getName()));
        } else {
            exComp.setText(DefaultMessagesImpl.getString("TableAnalysisResultPage.view", // $NON-NLS-1$
            tableIndicator.getColumnSet().getName()));
        }
        exComp.setLayout(new GridLayout());
        exComp.setLayoutData(new GridData(GridData.FILL_BOTH));
        // MOD xqliu 2009-06-23 bug 7481
        exComp.setExpanded(EditorPreferencePage.isUnfoldingAnalyzedEelementsResultPage());
        // ~
        final Composite comp = toolkit.createComposite(exComp);
        comp.setLayout(new GridLayout());
        comp.setLayoutData(new GridData(GridData.FILL_BOTH));
        exComp.setClient(comp);
        createResultDataComposite(comp, tableIndicator);
        exComp.addExpansionListener(new ExpansionAdapter() {

            @Override
            public void expansionStateChanged(ExpansionEvent e) {
                form.reflow(true);
            }
        });
    }
    resultSection.setClient(sectionClient);
}
Also used : AnalysisTableTreeViewer(org.talend.dataprofiler.core.ui.editor.composite.AnalysisTableTreeViewer) GridLayout(org.eclipse.swt.layout.GridLayout) TableIndicator(org.talend.dataprofiler.core.model.TableIndicator) AbstractPagePart(org.talend.dataprofiler.core.ui.editor.composite.AbstractPagePart) Composite(org.eclipse.swt.widgets.Composite) ExpandableComposite(org.eclipse.ui.forms.widgets.ExpandableComposite) GridData(org.eclipse.swt.layout.GridData) ExpansionAdapter(org.eclipse.ui.forms.events.ExpansionAdapter) ExpandableComposite(org.eclipse.ui.forms.widgets.ExpandableComposite) ExpansionEvent(org.eclipse.ui.forms.events.ExpansionEvent)

Aggregations

GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 ExpansionAdapter (org.eclipse.ui.forms.events.ExpansionAdapter)1 ExpansionEvent (org.eclipse.ui.forms.events.ExpansionEvent)1 ExpandableComposite (org.eclipse.ui.forms.widgets.ExpandableComposite)1 TableIndicator (org.talend.dataprofiler.core.model.TableIndicator)1 AbstractPagePart (org.talend.dataprofiler.core.ui.editor.composite.AbstractPagePart)1 AnalysisTableTreeViewer (org.talend.dataprofiler.core.ui.editor.composite.AnalysisTableTreeViewer)1