use of com.amalto.workbench.widgets.ElementComposite in project tmdm-studio-se by Talend.
the class NewConceptOrElementDialog method createDialogArea.
@Override
protected Control createDialogArea(Composite parent) {
parent.getShell().setText(title);
Composite composite = (Composite) super.createDialogArea(parent);
GridLayout layout = (GridLayout) composite.getLayout();
layout.numColumns = 2;
Label typeNameLabel = new Label(composite, SWT.NONE);
typeNameLabel.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, true, 1, 1));
typeNameLabel.setText(Messages.NewConceptOrElementDialog_Name);
typeNameText = new Text(composite, SWT.SINGLE | SWT.BORDER);
typeNameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1));
typeNameText.addModifyListener(this);
typeNameText.setFocus();
complexTypeBtn = new Button(composite, SWT.RADIO);
complexTypeBtn.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, true, 2, 1));
complexTypeBtn.setText(Messages.NewConceptOrElementDialog_ComplexType);
complexTypeBtn.setSelection(true);
complexTypeBtn.addSelectionListener(this);
conceptPanel = new ConceptComposite(composite, true, Util.getComplexTypes(schema), false);
simpleTypeBtn = new Button(composite, SWT.RADIO);
simpleTypeBtn.setText(Messages.NewConceptOrElementDialog_SimpleType);
simpleTypeBtn.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, true, 2, 1));
simpleTypeBtn.addSelectionListener(this);
elemPanel = new ElementComposite(conceptPanel.getComposite(), customTypes, builtInTypes, null, true);
composite = elemPanel.getComposite();
elemPanel.addModifyListener(this);
infoLabel = new Label(composite, SWT.NONE);
infoLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
conceptPanel.getTypeCombo().addModifyListener(this);
elemPanel.getTypeCombo().addModifyListener(this);
maskTypeWidgets();
return composite;
}
use of com.amalto.workbench.widgets.ElementComposite in project tmdm-studio-se by Talend.
the class SimpleTypeInputDialog method createDialogArea.
@Override
protected Control createDialogArea(Composite parent) {
// Should not really be here but well,....
parent.getShell().setText(this.title);
final Composite composite = (Composite) super.createDialogArea(parent);
// encapsulate all widgets into the ElementComposite which can be applied to several cases
elemPanel = new ElementComposite(composite, customTypes, builtInTypes, defaultTypeName, false);
elemPanel.getTypeCombo().addModifyListener(this);
infoLabel = new Label(composite, SWT.NONE);
infoLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
infoLabel.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_RED));
return elemPanel.getComposite();
}
Aggregations