Search in sources :

Example 1 with TabFolderEditors

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
        }
    });
}
Also used : TabFolderEditors(org.talend.designer.rowgenerator.ui.tabs.TabFolderEditors) Table(org.eclipse.swt.widgets.Table) IMetadataTable(org.talend.core.model.metadata.IMetadataTable) FooterComposite(org.talend.designer.rowgenerator.ui.footer.FooterComposite) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) FocusEvent(org.eclipse.swt.events.FocusEvent) SashForm(org.eclipse.swt.custom.SashForm) GridLayout(org.eclipse.swt.layout.GridLayout) ExternalRowGeneratorUiProperties(org.talend.designer.rowgenerator.external.data.ExternalRowGeneratorUiProperties) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) FocusListener(org.eclipse.swt.events.FocusListener) Display(org.eclipse.swt.widgets.Display)

Example 2 with TabFolderEditors

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);
}
Also used : TabFolderEditors(org.talend.designer.rowgenerator.ui.tabs.TabFolderEditors)

Aggregations

TabFolderEditors (org.talend.designer.rowgenerator.ui.tabs.TabFolderEditors)2 SashForm (org.eclipse.swt.custom.SashForm)1 FocusEvent (org.eclipse.swt.events.FocusEvent)1 FocusListener (org.eclipse.swt.events.FocusListener)1 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Display (org.eclipse.swt.widgets.Display)1 Table (org.eclipse.swt.widgets.Table)1 IMetadataTable (org.talend.core.model.metadata.IMetadataTable)1 ExternalRowGeneratorUiProperties (org.talend.designer.rowgenerator.external.data.ExternalRowGeneratorUiProperties)1 FooterComposite (org.talend.designer.rowgenerator.ui.footer.FooterComposite)1