use of org.talend.designer.rowgenerator.external.data.ExternalRowGeneratorUiProperties in project tdi-studio-se by Talend.
the class RowGeneratorUI method init.
/**
* yzhang Comment method "init".
*
* @param fromDialog
*/
public void init(boolean fromDialog) {
uiManager = generatorManager.getUiManager();
final ExternalRowGeneratorUiProperties uiProperties = uiManager.getUiProperties();
addParentListeners(uiManager, uiProperties);
final Display display = rowGenUIParent.getDisplay();
GridLayout parentLayout = new GridLayout(1, true);
rowGenUIParent.setLayout(parentLayout);
addKeyListener(uiManager, display);
mainSashForm = new SashForm(rowGenUIParent, SWT.SMOOTH | SWT.VERTICAL);
GridData mainSashFormGridData = new GridData(GridData.FILL_BOTH);
mainSashForm.setLayoutData(mainSashFormGridData);
datasFlowViewSashForm = new SashForm(mainSashForm, SWT.SMOOTH | SWT.HORIZONTAL | SWT.BORDER);
datasFlowViewSashForm.setLayoutData(mainSashFormGridData);
datasFlowViewSashForm.setBackgroundMode(SWT.INHERIT_FORCE);
initBackgroundComponents();
// if (WindowSystem.isGTK()) {
// datasFlowViewSashForm.setBackground(display.getSystemColor(SWT.COLOR_DARK_GRAY));
// }
/* Create Schema Table Editor */
createSchemaComposite();
/* Create the tabs */
tabFolderEditors = new TabFolderEditors(mainSashForm, SWT.BORDER, externalNode, dataTableView);
tabFolderEditors.setRowGeneratorUI(this);
tabFolderEditors.getProcessPreview().refreshTablePreview(outputMetaTable.getListColumns(), null, true);
if (!fromDialog) {
new FooterComposite(this.rowGenUIParent, SWT.NONE, generatorManager);
}
dataTableView.getTable().addSelectionListener(new SelectionAdapter() {
/*
* (non-Java)
*
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
*/
@SuppressWarnings("unchecked")
@Override
public void widgetSelected(SelectionEvent e) {
updateFunParameter((Table) e.getSource());
}
});
dataTableView.getTable().addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent e) {
dataTableView.getTableViewerCreator().refresh();
}
@Override
public void focusLost(FocusEvent e) {
// TODO Auto-generated method stub
}
});
}
Aggregations