use of org.talend.repository.json.ui.wizards.view.JSONFileTableViewerProvider in project tdi-studio-se by Talend.
the class JSONFileOutputStep2Form method addSchemaViewer.
private void addSchemaViewer(final Composite mainComposite, final int width, final int height) {
final Group group = Form.createGroup(mainComposite, 1, "Linker Source", height);
// group.setBackgroundMode(SWT.INHERIT_FORCE);
schemaButton = new Button(group, SWT.PUSH);
schemaButton.setText("Schema Management");
schemaButton.setToolTipText("You can add or edit schema and save in 'Schema List' viewer");
schemaViewer = new TableViewer(group);
JSONFileTableViewerProvider provider = new JSONFileTableViewerProvider();
schemaViewer.setContentProvider(provider);
schemaViewer.setLabelProvider(provider);
GridData gridData = new GridData(GridData.FILL_BOTH);
Table table = schemaViewer.getTable();
if (isReadOnly()) {
table.setEnabled(false);
}
table.setHeaderVisible(true);
org.eclipse.swt.widgets.TableColumn column = new org.eclipse.swt.widgets.TableColumn(table, SWT.LEFT);
column.setText("Schema List");
column.setWidth(100);
table.setLayoutData(gridData);
}
Aggregations