use of org.talend.dataprofiler.core.ui.wizard.indicator.forms.AbstractIndicatorForm in project tdq-studio-se by Talend.
the class DynamicIndicatorOptionsPage method createControl.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
Composite container = new Composite(parent, SWT.NONE);
container.setLayout(new FillLayout());
tabFolder = new TabFolder(container, SWT.FLAT);
tabFolder.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
Object formObject = e.item.getData();
if (formObject != null && getCurrentDialog() != null) {
AbstractIndicatorForm form = (AbstractIndicatorForm) formObject;
String helpHref = form.getFormEnum().getHelpHref();
getCurrentDialog().setHref(helpHref);
getCurrentDialog().showHelp();
}
}
});
FormEnum[] forms = FormEnum.getForms(indicatorUnit);
if (forms != null) {
validFroms = createForm(tabFolder, listener, forms);
setControl(createView(validFroms));
}
}
use of org.talend.dataprofiler.core.ui.wizard.indicator.forms.AbstractIndicatorForm in project tdq-studio-se by Talend.
the class DynamicIndicatorOptionsPage method createView.
private Composite createView(AbstractIndicatorForm... forms) {
try {
for (AbstractIndicatorForm iForm : forms) {
TabItem item = new TabItem(tabFolder, SWT.NONE);
item.setData(iForm);
item.setText(iForm.getFormName());
item.setControl(iForm);
}
} catch (Exception e) {
log.error(e, e);
}
return tabFolder;
}
use of org.talend.dataprofiler.core.ui.wizard.indicator.forms.AbstractIndicatorForm in project tdq-studio-se by Talend.
the class DynamicTableIndicatorOptionsPage method createForm.
public AbstractIndicatorForm[] createForm(Composite parent, ICheckListener listener, FormEnum[] formTypes) {
IndicatorParameters parameters = indicatorUnit.getIndicator().getParameters();
if (parameters == null) {
parameters = IndicatorsFactory.eINSTANCE.createIndicatorParameters();
indicatorUnit.getIndicator().setParameters(parameters);
}
AbstractIndicatorForm[] froms = new AbstractIndicatorForm[formTypes.length];
for (int i = 0; i < formTypes.length; i++) {
AbstractIndicatorForm form = IndicatorFormFactory.createForm(parent, formTypes[i], parameters);
form.setListener(listener);
froms[i] = form;
}
return froms;
}
use of org.talend.dataprofiler.core.ui.wizard.indicator.forms.AbstractIndicatorForm in project tdq-studio-se by Talend.
the class DynamicTableIndicatorOptionsPage method createControl.
public void createControl(Composite parent) {
Composite container = new Composite(parent, SWT.NONE);
container.setLayout(new FillLayout());
tabFolder = new TabFolder(container, SWT.FLAT);
tabFolder.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
Object formObject = e.item.getData();
if (formObject != null && getCurrentDialog() != null) {
AbstractIndicatorForm form = (AbstractIndicatorForm) formObject;
String helpHref = form.getFormEnum().getHelpHref();
getCurrentDialog().setHref(helpHref);
getCurrentDialog().showHelp();
}
}
});
FormEnum[] forms = FormEnum.getForms(indicatorUnit);
if (forms != null) {
validFroms = createForm(tabFolder, listener, forms);
setControl(createView(validFroms));
}
}
use of org.talend.dataprofiler.core.ui.wizard.indicator.forms.AbstractIndicatorForm in project tdq-studio-se by Talend.
the class DynamicTableIndicatorOptionsPage method createView.
private Composite createView(AbstractIndicatorForm... forms) {
try {
for (AbstractIndicatorForm iForm : forms) {
TabItem item = new TabItem(tabFolder, SWT.NONE);
item.setData(iForm);
item.setText(iForm.getFormName());
item.setControl(iForm);
}
} catch (Exception e) {
log.error(e, e);
}
return tabFolder;
}
Aggregations