use of org.talend.dataprofiler.core.ui.editor.composite.AnalysisTableTreeViewer 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);
}
use of org.talend.dataprofiler.core.ui.editor.composite.AnalysisTableTreeViewer in project tdq-studio-se by Talend.
the class BusinessRuleAnalysisDetailsPage method createAnalysisTablesSection.
void createAnalysisTablesSection(final ScrolledForm form1, Composite anasisDataComp) {
analysisTableSection = createSection(form1, anasisDataComp, DefaultMessagesImpl.getString("TableMasterDetailsPage.analyzeTable"), // $NON-NLS-1$
null);
Composite topComp1 = toolkit.createComposite(analysisTableSection);
topComp1.setLayout(new GridLayout());
// ~ MOD mzhao 2009-05-05,Bug 6587.
createConnBindWidget(topComp1);
// ~
Composite actionBarComp = toolkit.createComposite(topComp1);
GridLayout gdLayout = new GridLayout();
gdLayout.numColumns = 3;
actionBarComp.setLayout(gdLayout);
ImageHyperlink collapseAllImageLink = toolkit.createImageHyperlink(actionBarComp, SWT.NONE);
// $NON-NLS-1$
collapseAllImageLink.setToolTipText(DefaultMessagesImpl.getString("TableMasterDetailsPage.collapseAllTables"));
WorkbenchUtils.setHyperlinkImage(collapseAllImageLink, ImageLib.getImage(ImageLib.COLLAPSE_ALL));
collapseAllImageLink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
TreeItem[] items = treeViewer.getTree().getItems();
expandTreeItems(items, false);
packOtherColumns();
}
});
ImageHyperlink expandAllImageLink = toolkit.createImageHyperlink(actionBarComp, SWT.NONE);
// $NON-NLS-1$
expandAllImageLink.setToolTipText(DefaultMessagesImpl.getString("TableMasterDetailsPage.expandAllTables"));
WorkbenchUtils.setHyperlinkImage(expandAllImageLink, ImageLib.getImage(ImageLib.EXPAND_ALL));
expandAllImageLink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
TreeItem[] items = treeViewer.getTree().getItems();
expandTreeItems(items, true);
packOtherColumns();
}
});
Button clmnBtn = // $NON-NLS-1$
toolkit.createButton(// $NON-NLS-1$
actionBarComp, // $NON-NLS-1$
DefaultMessagesImpl.getString("TableMasterDetailsPage.selectTable"), SWT.NONE);
clmnBtn.addMouseListener(new MouseAdapter() {
@Override
public void mouseDown(MouseEvent e) {
openTableSelectionDialog();
}
});
Composite treeComp = toolkit.createComposite(topComp1, SWT.NONE);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(treeComp);
treeComp.setLayout(new GridLayout());
((GridData) treeComp.getLayoutData()).heightHint = TREE_MAX_LENGTH;
treeComp.setBackgroundMode(SWT.INHERIT_DEFAULT);
treeViewer = new AnalysisTableTreeViewer(treeComp, this);
treeViewer.setDirty(false);
treeViewer.addPropertyChangeListener(this);
analysisTableSection.setClient(topComp1);
}
Aggregations