use of org.talend.designer.rowgenerator.ui.tabs.TabFolderEditors 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
}
});
}
use of org.talend.designer.rowgenerator.ui.tabs.TabFolderEditors in project tdi-studio-se by Talend.
the class MetadataTableEditorViewExt method refreshPreviewColumn.
// private Function getFunnctionByName(String talendType, String value) {
// Function func = null;
// List<Function> functionByType = functionManager.getFunctionsByType(talendType);
// for (Function fun : functionByType) {
// // see bug 8055,remove the getLastName() method in TDQ,it has the same name as in TIS.
// if (value.equals(FunctionManagerExt.getFunctionLable(fun))) {
// return (Function) fun.clone();
// }
// }
// return func;
// }
/**
* qzhang Comment method "refreshPreviewColumn".
*/
public void refreshPreviewColumn() {
TabFolderEditors tabFolderEditors = generatorUI.getTabFolderEditors();
preview2(tabFolderEditors);
}
Aggregations