Search in sources :

Example 1 with ContextComposite

use of org.talend.repository.generic.ui.context.ContextComposite in project tdi-studio-se by Talend.

the class GenericConnWizardPage method createControl.

@Override
public void createControl(final Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    container.setLayoutData(new GridData(GridData.FILL_BOTH));
    container.setLayout(new FormLayout());
    setControl(container);
    baseElement = new FakeElement(form.getName());
    baseElement.setReadOnly(!isRepositoryObjectEditable);
    dynamicComposite = new DynamicComposite(container, SWT.H_SCROLL | SWT.V_SCROLL | SWT.NO_FOCUS, EComponentCategory.BASIC, baseElement, true, container.getBackground(), form, false);
    dynamicComposite.setLayoutData(createMainFormData(addContextFields));
    dynamicComposite.setWizardPropertyChangeListener(this);
    dynamicComposite.setConnectionItem(connectionItem);
    addCheckListener(dynamicComposite.getChecker());
    if (addContextFields) {
        Composite contextParentComp = new Composite(container, SWT.NONE);
        contextParentComp.setLayoutData(createFooterFormData(dynamicComposite));
        contextParentComp.setLayout(new GridLayout());
        ContextComposite contextComp = addContextFields(contextParentComp);
        contextComp.addPropertyChangeListener(dynamicComposite);
        contextComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    }
}
Also used : FormLayout(org.eclipse.swt.layout.FormLayout) GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) ContextComposite(org.talend.repository.generic.ui.context.ContextComposite) GridData(org.eclipse.swt.layout.GridData) ContextComposite(org.talend.repository.generic.ui.context.ContextComposite) FakeElement(org.talend.designer.core.model.FakeElement)

Example 2 with ContextComposite

use of org.talend.repository.generic.ui.context.ContextComposite in project tdi-studio-se by Talend.

the class GenericWizardPage method addContextFields.

protected ContextComposite addContextFields(Composite parentComposite) {
    contextHandler = new GenericContextHandler();
    contextHandler.setParameters(getContextParameters());
    ContextComposite contextComp = new ContextComposite(parentComposite, connectionItem, !isRepositoryObjectEditable, contextHandler);
    return contextComp;
}
Also used : ContextComposite(org.talend.repository.generic.ui.context.ContextComposite) GenericContextHandler(org.talend.repository.generic.ui.context.handler.GenericContextHandler)

Aggregations

ContextComposite (org.talend.repository.generic.ui.context.ContextComposite)2 FormLayout (org.eclipse.swt.layout.FormLayout)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 FakeElement (org.talend.designer.core.model.FakeElement)1 GenericContextHandler (org.talend.repository.generic.ui.context.handler.GenericContextHandler)1