use of org.talend.core.ui.metadata.editor.MetadataEmfTableEditorView in project tdi-studio-se by Talend.
the class JSONFileOutputStep3Form method addFields.
@Override
protected void addFields() {
Composite mainComposite = Form.startNewDimensionnedGridLayout(this, 2, WIDTH_GRIDDATA_PIXEL, 60);
metadataNameText = new LabelledText(mainComposite, "Name");
metadataCommentText = new LabelledText(mainComposite, "Comment");
Group groupMetaData = Form.createGroup(this, 1, "Schema", 280);
Composite compositeMetaData = Form.startNewGridLayout(groupMetaData, 1);
Composite compositeTable = Form.startNewDimensionnedGridLayout(compositeMetaData, 1, WIDTH_GRIDDATA_PIXEL, 200);
compositeTable.setLayout(new FillLayout());
metadataEditor = new MetadataEmfTableEditor("Description of the Schema");
tableEditorView = new MetadataEmfTableEditorView(compositeTable, SWT.NONE);
}
use of org.talend.core.ui.metadata.editor.MetadataEmfTableEditorView in project tdi-studio-se by Talend.
the class BRMSSchemaOutputDialog method createDialogArea.
protected Control createDialogArea(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
applyDialogFont(composite);
// Composite composite = (Composite) super.createDialogArea(parent);
composite.setLayout(new FillLayout());
tableEditor = new MetadataEmfTableEditor("");
MetadataTable metadataTable = form.getMetadataOutputTable();
tableEditor.setMetadataTable(metadataTable);
tableEditor.removeAll();
// List<MetadataColumn> list = (List<MetadataColumn>) metadataTable.getColumns();
// tableEditor.addAll(list);
// if (list.size() > 0) {
// for (MetadataColumn column : list) {
// boolean toAdd = true;
// for (int i = 0; i < list.size(); i++) {
// String label = column.getLabel();
// String curLabel = list.get(i).getLabel();
// if (label.equals(curLabel)) {
// toAdd = false;
// break;
// }
// }
// if (toAdd) {
// tableEditor.add(column);
// }
// }
// }
tableEditorView = new MetadataEmfTableEditorView(composite, SWT.NONE);
tableEditorView.setMetadataEditor(tableEditor);
addListeners();
return composite;
}
use of org.talend.core.ui.metadata.editor.MetadataEmfTableEditorView in project tdi-studio-se by Talend.
the class GenericSchemaForm method addFields.
@Override
protected void addFields() {
Composite mainComposite = Form.startNewDimensionnedGridLayout(this, 2, WIDTH_GRIDDATA_PIXEL, 60);
//$NON-NLS-1$
metadataNameText = new LabelledText(mainComposite, Messages.getString("GenericSchemaForm.metadataName"));
//$NON-NLS-1$
metadataCommentText = new LabelledText(mainComposite, Messages.getString("GenericSchemaForm.metadataComment"));
//$NON-NLS-1$
Group groupMetaData = Form.createGroup(this, 1, Messages.getString("GenericSchemaForm.groupMetadata"), 280);
Composite compositeMetaData = Form.startNewGridLayout(groupMetaData, 1);
Composite compositeTable = Form.startNewDimensionnedGridLayout(compositeMetaData, 1, WIDTH_GRIDDATA_PIXEL, 200);
compositeTable.setLayout(new FillLayout());
//$NON-NLS-1$
metadataEditor = new MetadataEmfTableEditor(Messages.getString("GenericSchemaForm.metadataDescription"));
tableEditorView = new MetadataEmfTableEditorView(compositeTable, SWT.NONE);
}
use of org.talend.core.ui.metadata.editor.MetadataEmfTableEditorView in project tdi-studio-se by Talend.
the class JSONFileSchemaDialog method createDialogArea.
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
composite.setLayout(new FillLayout());
tableEditor = new MetadataEmfTableEditor("");
MetadataTable metadataTable = form.getMetadataTable();
tableEditor.setMetadataTable(metadataTable);
// tableEditor.removeAll();
List<MetadataColumn> list = (List<MetadataColumn>) form.getSchemaViewer().getInput();
tableEditor.addAll(list);
// if (list.size() > 0) {
// for (MetadataColumn column : list) {
// boolean toAdd = true;
// for (int i = 0; i < currentColumnList.size(); i++) {
// String label = column.getLabel();
// String curLabel = currentColumnList.get(i).getLabel();
// if (label.equals(curLabel)) {
// toAdd = false;
// break;
// }
// }
// if (toAdd) {
// tableEditor.add(column);
// }
// }
// }
tableEditorView = new MetadataEmfTableEditorView(composite, SWT.NONE);
tableEditorView.setMetadataEditor(tableEditor);
addListeners();
return composite;
}
use of org.talend.core.ui.metadata.editor.MetadataEmfTableEditorView in project tdi-studio-se by Talend.
the class WSDLSchemaDialog method createDialogArea.
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
composite.setLayout(new FillLayout());
tableEditor = new MetadataEmfTableEditor("");
tableEditor.setMetadataTable(metadataTable);
// (List<MetadataColumn>)
List<MetadataColumn> list = metadataTable.getColumns();
// form.getSchemaViewer().getInput();
tableEditor.addAll(list);
tableEditorView = new MetadataEmfTableEditorView(composite, SWT.NONE);
tableEditorView.setMetadataEditor(tableEditor);
return composite;
}
Aggregations