Search in sources :

Example 1 with IBaseLabelProvider

use of org.eclipse.jface.viewers.IBaseLabelProvider in project tdi-studio-se by Talend.

the class NameAndLabelsTreeController method createControl.

@Override
public Control createControl(Composite subComposite, final IElementParameter param, int numInRow, int nbInRow, int top, Control lastControl) {
    FormData data = new FormData();
    data.left = new FormAttachment(0, 0);
    data.top = new FormAttachment(0, 0);
    data.right = new FormAttachment(100, 0);
    data.bottom = new FormAttachment(100, 0);
    Composite parentComp = new Composite(subComposite, SWT.NONE);
    parentComp.setLayoutData(data);
    parentComp.setLayout(new GridLayout());
    ElementsSelectionComposite<NamedThing> selectionComposite = new ElementsSelectionComposite<NamedThing>(parentComp) {

        @Override
        protected IBaseLabelProvider getLabelProvider() {
            return new LabelProvider() {

                @Override
                public String getText(Object obj) {
                    NamedThing nal = (NamedThing) obj;
                    return nal.getDisplayName();
                }

                @Override
                public Image getImage(Object obj) {
                    return null;
                }
            };
        }

        ;

        @Override
        protected void doSelectionChanged() {
            param.setValue(getSelectedElements());
        }

        @Override
        protected List<String> getSelectedElementLabels() {
            List<String> labels = new ArrayList<>();
            Object value = param.getValue();
            if (value instanceof List) {
                List<?> values = (List<?>) value;
                for (Object valueObj : values) {
                    if (valueObj instanceof NamedThing) {
                        labels.add(((NamedThing) valueObj).getName());
                    }
                }
                return labels;
            }
            return null;
        }

        @Override
        protected List<NamedThing> getInitSelectedElements(List<String> selectedElementLabels) {
            List<NamedThing> selectedElements = new ArrayList<>();
            List<NamedThing> viewerDatas = getViewerData();
            for (NamedThing viewerData : viewerDatas) {
                if (selectedElementLabels.contains(viewerData.getName())) {
                    selectedElements.add(viewerData);
                }
            }
            return selectedElements;
        }
    }.setShowToolbar(true).create();
    selectionComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
    if (param instanceof GenericElementParameter) {
        selectionComposite.setViewerData(ComponentsUtils.getFormalPossibleValues((GenericElementParameter) param));
    }
    selectionComposite.setCheckedState();
    return parentComp;
}
Also used : FormData(org.eclipse.swt.layout.FormData) ElementsSelectionComposite(org.talend.core.ui.composite.ElementsSelectionComposite) ElementsSelectionComposite(org.talend.core.ui.composite.ElementsSelectionComposite) Composite(org.eclipse.swt.widgets.Composite) ArrayList(java.util.ArrayList) NamedThing(org.talend.daikon.NamedThing) GridLayout(org.eclipse.swt.layout.GridLayout) GridData(org.eclipse.swt.layout.GridData) GenericElementParameter(org.talend.designer.core.generic.model.GenericElementParameter) ArrayList(java.util.ArrayList) List(java.util.List) IBaseLabelProvider(org.eclipse.jface.viewers.IBaseLabelProvider) LabelProvider(org.eclipse.jface.viewers.LabelProvider) FormAttachment(org.eclipse.swt.layout.FormAttachment)

Example 2 with IBaseLabelProvider

use of org.eclipse.jface.viewers.IBaseLabelProvider in project tdi-studio-se by Talend.

the class NameAndLabelsDialog method createDialogArea.

@Override
protected Control createDialogArea(Composite parent) {
    Composite composite = (Composite) super.createDialogArea(parent);
    Composite comp = new Composite(composite, SWT.NONE);
    comp.setLayoutData(new GridData(GridData.FILL_BOTH));
    comp.setLayout(new GridLayout());
    selectionComposite = new ElementsSelectionComposite<NamedThing>(comp) {

        @Override
        protected IBaseLabelProvider getLabelProvider() {
            return new LabelProvider() {

                @Override
                public String getText(Object obj) {
                    NamedThing nal = (NamedThing) obj;
                    return nal.getDisplayName();
                }

                @Override
                public Image getImage(Object obj) {
                    return null;
                }
            };
        }

        ;
    }.setMultipleSelection(false).create();
    selectionComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
    selectionComposite.setViewerData(nameAndLabels);
    Composite customComposite = new Composite(comp, SWT.NONE);
    customComposite.setLayout(new GridLayout());
    customComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    Button useCustomBtn = new Button(customComposite, SWT.CHECK);
    //$NON-NLS-1$
    useCustomBtn.setText(Messages.getString("NameAndLabelsDialog.custom.button"));
    useCustomBtn.addSelectionListener(new SelectionAdapter() {

        @Override
        public void widgetSelected(SelectionEvent e) {
            updateFieldsStatus(useCustomBtn.getSelection());
        }
    });
    //$NON-NLS-1$
    customObjNameText = new LabelledText(customComposite, Messages.getString("NameAndLabelsDialog.custom.text"));
    updateFieldsStatus(useCustomBtn.getSelection());
    if (!isInWizard) {
        // set empty quotes to show the user he should fill the name between quotes
        //$NON-NLS-1$
        customObjNameText.setText("\"\"");
    }
    return composite;
}
Also used : LabelledText(org.talend.commons.ui.swt.formtools.LabelledText) ElementsSelectionComposite(org.talend.core.ui.composite.ElementsSelectionComposite) Composite(org.eclipse.swt.widgets.Composite) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) NamedThing(org.talend.daikon.NamedThing) Image(org.eclipse.swt.graphics.Image) GridLayout(org.eclipse.swt.layout.GridLayout) Button(org.eclipse.swt.widgets.Button) GridData(org.eclipse.swt.layout.GridData) IBaseLabelProvider(org.eclipse.jface.viewers.IBaseLabelProvider) SelectionEvent(org.eclipse.swt.events.SelectionEvent) IBaseLabelProvider(org.eclipse.jface.viewers.IBaseLabelProvider) LabelProvider(org.eclipse.jface.viewers.LabelProvider)

Example 3 with IBaseLabelProvider

use of org.eclipse.jface.viewers.IBaseLabelProvider in project tdi-studio-se by Talend.

the class MavenVersionManagementProjectSettingPage method addItemElements.

@Override
protected void addItemElements(List<ItemVersionObject> elements) {
    if (elements == null || elements.isEmpty()) {
        return;
    }
    itemTable.setRedraw(false);
    for (final ItemVersionObject object : elements) {
        final TableItem tableItem = new TableItem(itemTable, SWT.CENTER);
        tableItem.setData(object);
        Item item = object.getItem();
        IBaseLabelProvider labelProvider = treeViewer.getLabelProvider();
        Image itemsImage = null;
        if (labelProvider instanceof NavigatorDecoratingLabelProvider) {
            NavigatorDecoratingLabelProvider navigatorProvider = (NavigatorDecoratingLabelProvider) labelProvider;
            itemsImage = navigatorProvider.getImage(object.getRepositoryNode());
        } else {
            ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
            itemsImage = getItemsImage(CoreImageProvider.getIcon(itemType));
        }
        tableItem.setImage(itemsImage);
        tableItem.setText(item.getProperty().getLabel());
        // old version
        tableItem.setText(1, MavenVersionUtils.getItemMavenVersion(item.getProperty()));
        TableEditor versionEditor = null;
        if (fixedVersionButton.getSelection()) {
            tableItem.setText(2, appliedFixedVersion);
        } else if (useJobVersionButton.getSelection()) {
            String jobDefaultVersion = MavenVersionUtils.getDefaultVersion(item.getProperty().getVersion());
            tableItem.setText(2, jobDefaultVersion);
            object.setNewVersion(jobDefaultVersion);
        } else {
            // new version
            versionEditor = new TableEditor(itemTable);
            Composite versionComposite = new Composite(itemTable, SWT.NONE);
            GridLayout layout = new GridLayout(1, false);
            layout.marginHeight = 0;
            layout.marginWidth = 0;
            layout.marginLeft = 0;
            layout.marginRight = 1;
            versionComposite.setLayout(layout);
            final Text text = new Text(versionComposite, SWT.CENTER | SWT.BORDER);
            GridData data = new GridData(GridData.FILL_BOTH);
            text.setLayoutData(data);
            String newVersion = object.getNewVersion();
            if (newVersion == null || "".equals(newVersion.trim())) {
                //$NON-NLS-1$
                newVersion = appliedFixedVersion;
                object.setNewVersion(newVersion);
            }
            text.setText(newVersion);
            checkVersionPattern(text, newVersion);
            text.addModifyListener(new ModifyListener() {

                @Override
                public void modifyText(ModifyEvent e) {
                    String version = text.getText();
                    checkVersionPattern(text, version);
                    object.setNewVersion(version);
                    checkValid();
                }
            });
            versionEditor.minimumWidth = itemTable.getColumn(2).getWidth();
            versionEditor.setEditor(versionComposite, tableItem, 2);
        }
        TableEditor delEditor = new TableEditor(itemTable);
        Label delLabel = new Label(itemTable, SWT.CENTER);
        delLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
        delLabel.setImage(ImageProvider.getImage(EImage.DELETE_ICON));
        //$NON-NLS-1$
        delLabel.setToolTipText(Messages.getString("VersionManagementDialog.DeletedTip"));
        delLabel.pack();
        delLabel.addMouseListener(new MouseAdapter() {

            @Override
            public void mouseDown(MouseEvent e) {
                checkedObjects.remove(object);
                removeTableItem(tableItem);
                refreshCheckedTreeView();
                checkButtonsState();
                checkButtonsState(false);
            }
        });
        delEditor.minimumWidth = 25;
        delEditor.horizontalAlignment = SWT.CENTER;
        delEditor.setEditor(delLabel, tableItem, 3);
        if (fixedVersionButton.getSelection() || useJobVersionButton.getSelection()) {
            tableItem.setData(ITEM_EDITOR_KEY, new TableEditor[] { delEditor });
        } else if (versionEditor != null) {
            tableItem.setData(ITEM_EDITOR_KEY, new TableEditor[] { versionEditor, delEditor });
        }
        itemTable.setRedraw(true);
    }
}
Also used : MouseEvent(org.eclipse.swt.events.MouseEvent) Composite(org.eclipse.swt.widgets.Composite) ModifyListener(org.eclipse.swt.events.ModifyListener) NavigatorDecoratingLabelProvider(org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider) TableItem(org.eclipse.swt.widgets.TableItem) Label(org.eclipse.swt.widgets.Label) MouseAdapter(org.eclipse.swt.events.MouseAdapter) Text(org.eclipse.swt.widgets.Text) Image(org.eclipse.swt.graphics.Image) EImage(org.talend.commons.ui.runtime.image.EImage) TableEditor(org.eclipse.swt.custom.TableEditor) Item(org.talend.core.model.properties.Item) TableItem(org.eclipse.swt.widgets.TableItem) GridLayout(org.eclipse.swt.layout.GridLayout) ModifyEvent(org.eclipse.swt.events.ModifyEvent) IBaseLabelProvider(org.eclipse.jface.viewers.IBaseLabelProvider) GridData(org.eclipse.swt.layout.GridData) ItemVersionObject(org.talend.repository.model.ItemVersionObject) ERepositoryObjectType(org.talend.core.model.repository.ERepositoryObjectType)

Example 4 with IBaseLabelProvider

use of org.eclipse.jface.viewers.IBaseLabelProvider in project tdi-studio-se by Talend.

the class StatusManagerSettingPage method addItemElements.

private void addItemElements(List<RepositoryObject> elements) {
    if (elements == null || elements.isEmpty()) {
        return;
    }
    final Color redColor = Display.getDefault().getSystemColor(SWT.COLOR_RED);
    for (final RepositoryObject object : elements) {
        if (object.isDeleted()) {
            continue;
        }
        TableItem tableItem = null;
        // for bug 17692
        ERepositoryObjectType objectType = object.getRepositoryNode().getObjectType();
        ERepositoryObjectType type = object.getRepositoryNode().getContentType();
        if (!objectType.equals(ERepositoryObjectType.JOB_DOC) && !objectType.equals(ERepositoryObjectType.JOBLET_DOC)) {
            if (isTechinalStatus()) {
                // obj.equals(constant) that will cause NPE.
                if (!type.equals(ERepositoryObjectType.DOCUMENTATION) && !type.equals(ERepositoryObjectType.BUSINESS_PROCESS) && !type.equals(ERepositoryObjectType.JOBLET_DOC)) {
                    // if (!type.equals(ERepositoryObjectType.DOCUMENTATION) &&
                    // !type.equals(ERepositoryObjectType.BUSINESS_PROCESS)
                    // && !type.equals(ERepositoryObjectType.JOBLETS)) {
                    itemTable.setRedraw(false);
                    tableItem = new TableItem(itemTable, SWT.NONE);
                }
            } else if (isDocumentStatus()) {
                if (type.equals(ERepositoryObjectType.DOCUMENTATION) || type.equals(ERepositoryObjectType.BUSINESS_PROCESS)) {
                    itemTable.setRedraw(false);
                    tableItem = new TableItem(itemTable, SWT.NONE);
                }
            } else // bug 20078
            {
                itemTable.setRedraw(false);
                tableItem = new TableItem(itemTable, SWT.NONE);
            }
        } else {
            if (isDocumentStatus()) {
                if (type.equals(ERepositoryObjectType.JOB_DOC) || type.equals(ERepositoryObjectType.JOBLET_DOC)) {
                    itemTable.setRedraw(false);
                    tableItem = new TableItem(itemTable, SWT.NONE);
                }
            }
        }
        if (tableItem != null) {
            tableItem.setData(object);
            try {
                statusHelper.getStatusList(object.getProperty());
            } catch (PersistenceException e1) {
            // TODO Auto-generated catch block
            }
            object.getProperty().setOldStatusCode(statusHelper.getStatusCode(object.getStatusCode()));
            Image itemsImage = null;
            IBaseLabelProvider labelProvider = treeViewer.getLabelProvider();
            if (labelProvider instanceof NavigatorDecoratingLabelProvider) {
                NavigatorDecoratingLabelProvider navigatorProvider = (NavigatorDecoratingLabelProvider) labelProvider;
                itemsImage = navigatorProvider.getImage(object.getRepositoryNode());
            } else {
                ERepositoryObjectType itemType = object.getRepositoryObjectType();
                itemsImage = getItemsImage(CoreImageProvider.getIcon(itemType));
            }
            tableItem.setImage(itemsImage);
            tableItem.setText(object.getLabel());
            // old version
            tableItem.setText(1, statusHelper.getStatusLabel(object.getStatusCode()));
            TableEditor versionEditor = null;
            if (isFixedstatus()) {
                String version = statusCombo.getText();
                tableItem.setText(2, version);
                if (!object.getProperty().getOldStatusCode().equals(statusHelper.getStatusCode(version))) {
                    tableItem.setForeground(2, redColor);
                } else {
                    tableItem.setForeground(2, Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
                }
            } else {
                // new version
                versionEditor = new TableEditor(itemTable);
                Composite versionComposit = new Composite(itemTable, SWT.NONE);
                GridLayout layout = new GridLayout(3, false);
                layout.horizontalSpacing = 1;
                layout.verticalSpacing = 0;
                layout.marginHeight = 0;
                layout.marginWidth = 0;
                versionComposit.setLayout(layout);
                final CCombo statusItemCombo = new CCombo(versionComposit, SWT.BORDER | SWT.READ_ONLY);
                GridData data = new GridData(GridData.FILL_HORIZONTAL);
                statusItemCombo.setLayoutData(data);
                statusItemCombo.setEditable(false);
                if (!type.equals(ERepositoryObjectType.DOCUMENTATION) && !type.equals(ERepositoryObjectType.BUSINESS_PROCESS)) {
                    statusItemCombo.setItems(toArray(technicalStatusList));
                    statusItemCombo.select(0);
                    if (!object.getProperty().getOldStatusCode().equals("DEV")) {
                        statusItemCombo.setForeground(redColor);
                    } else {
                        statusItemCombo.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_BLUE));
                    }
                } else {
                    statusItemCombo.setItems(toArray(documentStatusList));
                    statusItemCombo.select(0);
                    if (!object.getProperty().getOldStatusCode().equals("UCK")) {
                        statusItemCombo.setForeground(redColor);
                    } else {
                        statusItemCombo.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_BLUE));
                    }
                }
                statusItemCombo.addSelectionListener(new SelectionAdapter() {

                    @Override
                    public void widgetSelected(SelectionEvent e) {
                        String version = statusItemCombo.getText();
                        String status = statusHelper.getStatusCode(version);
                        if (!status.equals(object.getProperty().getOldStatusCode())) {
                            statusItemCombo.setForeground(redColor);
                        }
                        object.getProperty().setStatusCode(statusHelper.getStatusCode(version));
                    }
                });
                versionEditor.minimumWidth = itemTable.getColumn(2).getWidth();
                versionEditor.setEditor(versionComposit, tableItem, 2);
            }
            TableEditor delEditor = new TableEditor(itemTable);
            Label delLabel = new Label(itemTable, SWT.CENTER);
            delLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
            delLabel.setImage(ImageProvider.getImage(EImage.DELETE_ICON));
            //$NON-NLS-1$
            delLabel.setToolTipText(Messages.getString("VersionManagementDialog.DeletedTip"));
            delLabel.pack();
            addLabelMouseListener(delLabel, object, tableItem);
            delEditor.minimumWidth = 25;
            delEditor.horizontalAlignment = SWT.CENTER;
            delEditor.setEditor(delLabel, tableItem, 3);
            if (isFixedstatus()) {
                tableItem.setData(ITEM_EDITOR_KEY, new TableEditor[] { delEditor });
            } else if (versionEditor != null) {
                tableItem.setData(ITEM_EDITOR_KEY, new TableEditor[] { versionEditor, delEditor });
            }
            itemTable.setRedraw(true);
        }
    }
}
Also used : RepositoryObject(org.talend.core.model.repository.RepositoryObject) Composite(org.eclipse.swt.widgets.Composite) NavigatorDecoratingLabelProvider(org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider) Color(org.eclipse.swt.graphics.Color) TableItem(org.eclipse.swt.widgets.TableItem) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) Label(org.eclipse.swt.widgets.Label) IImage(org.talend.commons.ui.runtime.image.IImage) Image(org.eclipse.swt.graphics.Image) EImage(org.talend.commons.ui.runtime.image.EImage) TableEditor(org.eclipse.swt.custom.TableEditor) GridLayout(org.eclipse.swt.layout.GridLayout) CCombo(org.eclipse.swt.custom.CCombo) PersistenceException(org.talend.commons.exception.PersistenceException) IBaseLabelProvider(org.eclipse.jface.viewers.IBaseLabelProvider) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) ERepositoryObjectType(org.talend.core.model.repository.ERepositoryObjectType)

Example 5 with IBaseLabelProvider

use of org.eclipse.jface.viewers.IBaseLabelProvider in project tdi-studio-se by Talend.

the class VersionManagementPage method addItemElements.

@Override
protected void addItemElements(List<ItemVersionObject> elements) {
    if (elements == null || elements.isEmpty()) {
        return;
    }
    itemTable.setRedraw(false);
    final Color redColor = Display.getDefault().getSystemColor(SWT.COLOR_RED);
    for (final ItemVersionObject object : elements) {
        final TableItem tableItem = new TableItem(itemTable, SWT.NONE);
        tableItem.setData(object);
        Item item = object.getItem();
        IBaseLabelProvider labelProvider = treeViewer.getLabelProvider();
        Image itemsImage = null;
        if (labelProvider instanceof NavigatorDecoratingLabelProvider) {
            NavigatorDecoratingLabelProvider navigatorProvider = (NavigatorDecoratingLabelProvider) labelProvider;
            itemsImage = navigatorProvider.getImage(object.getRepositoryNode());
        } else {
            ERepositoryObjectType itemType = ERepositoryObjectType.getItemType(item);
            itemsImage = getItemsImage(CoreImageProvider.getIcon(itemType));
        }
        tableItem.setImage(itemsImage);
        tableItem.setText(item.getProperty().getLabel());
        // old version
        tableItem.setText(1, object.getOldVersion());
        TableEditor versionEditor = null;
        if (isFixedVersion()) {
            String version = fixedVersionText.getText();
            tableItem.setText(2, version);
            if (VersionUtils.compareTo(version, object.getOldVersion()) > 0) {
                tableItem.setForeground(2, redColor);
            } else {
                tableItem.setForeground(2, Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
            }
        } else {
            // new version
            versionEditor = new TableEditor(itemTable);
            Composite versionComposit = new Composite(itemTable, SWT.NONE);
            GridLayout layout = new GridLayout(3, false);
            layout.horizontalSpacing = 1;
            layout.verticalSpacing = 0;
            layout.marginHeight = 0;
            layout.marginWidth = 0;
            versionComposit.setLayout(layout);
            final Text text = new Text(versionComposit, SWT.BORDER | SWT.READ_ONLY);
            GridData data = new GridData(GridData.FILL_HORIZONTAL);
            text.setLayoutData(data);
            text.setEditable(false);
            text.setText(object.getNewVersion());
            if (VersionUtils.compareTo(object.getNewVersion(), object.getOldVersion()) > 0) {
                text.setForeground(redColor);
            } else {
                text.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_BLUE));
            }
            Button tableMajorBtn = new Button(versionComposit, SWT.NONE);
            //$NON-NLS-1$
            tableMajorBtn.setText("M");
            //$NON-NLS-1$
            tableMajorBtn.setToolTipText(Messages.getString("VersionManagementDialog.MajorVersionTip"));
            Button tableMinorBtn = new Button(versionComposit, SWT.NONE);
            //$NON-NLS-1$
            tableMinorBtn.setText("m");
            //$NON-NLS-1$
            tableMinorBtn.setToolTipText(Messages.getString("VersionManagementDialog.MinorVersionTip"));
            tableMajorBtn.addSelectionListener(new SelectionAdapter() {

                @Override
                public void widgetSelected(SelectionEvent e) {
                    String version = object.getNewVersion();
                    version = VersionUtils.upMajor(version);
                    text.setText(version);
                    text.setForeground(redColor);
                    object.setNewVersion(version);
                }
            });
            tableMinorBtn.addSelectionListener(new SelectionAdapter() {

                @Override
                public void widgetSelected(SelectionEvent e) {
                    String version = object.getNewVersion();
                    version = VersionUtils.upMinor(version);
                    text.setText(version);
                    text.setForeground(redColor);
                    object.setNewVersion(version);
                }
            });
            versionEditor.minimumWidth = itemTable.getColumn(2).getWidth();
            versionEditor.setEditor(versionComposit, tableItem, 2);
        }
        TableEditor delEditor = new TableEditor(itemTable);
        Label delLabel = new Label(itemTable, SWT.CENTER);
        delLabel.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
        delLabel.setImage(ImageProvider.getImage(EImage.DELETE_ICON));
        //$NON-NLS-1$
        delLabel.setToolTipText(Messages.getString("VersionManagementDialog.DeletedTip"));
        delLabel.pack();
        delLabel.addMouseListener(new MouseAdapter() {

            @Override
            public void mouseDown(MouseEvent e) {
                checkedObjects.remove(object);
                removeTableItem(tableItem);
                refreshCheckedTreeView();
                checkButtonsState();
                checkButtonsState(false);
            }
        });
        delEditor.minimumWidth = 25;
        delEditor.horizontalAlignment = SWT.CENTER;
        delEditor.setEditor(delLabel, tableItem, 3);
        if (isFixedVersion()) {
            tableItem.setData(ITEM_EDITOR_KEY, new TableEditor[] { delEditor });
        } else if (versionEditor != null) {
            tableItem.setData(ITEM_EDITOR_KEY, new TableEditor[] { versionEditor, delEditor });
        }
        itemTable.setRedraw(true);
    }
}
Also used : MouseEvent(org.eclipse.swt.events.MouseEvent) Composite(org.eclipse.swt.widgets.Composite) NavigatorDecoratingLabelProvider(org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider) Color(org.eclipse.swt.graphics.Color) TableItem(org.eclipse.swt.widgets.TableItem) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) Label(org.eclipse.swt.widgets.Label) MouseAdapter(org.eclipse.swt.events.MouseAdapter) Text(org.eclipse.swt.widgets.Text) Image(org.eclipse.swt.graphics.Image) EImage(org.talend.commons.ui.runtime.image.EImage) TableEditor(org.eclipse.swt.custom.TableEditor) Item(org.talend.core.model.properties.Item) TableItem(org.eclipse.swt.widgets.TableItem) GridLayout(org.eclipse.swt.layout.GridLayout) Button(org.eclipse.swt.widgets.Button) IBaseLabelProvider(org.eclipse.jface.viewers.IBaseLabelProvider) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) ItemVersionObject(org.talend.repository.model.ItemVersionObject) ERepositoryObjectType(org.talend.core.model.repository.ERepositoryObjectType)

Aggregations

IBaseLabelProvider (org.eclipse.jface.viewers.IBaseLabelProvider)5 GridData (org.eclipse.swt.layout.GridData)5 GridLayout (org.eclipse.swt.layout.GridLayout)5 Composite (org.eclipse.swt.widgets.Composite)5 Image (org.eclipse.swt.graphics.Image)4 TableEditor (org.eclipse.swt.custom.TableEditor)3 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)3 SelectionEvent (org.eclipse.swt.events.SelectionEvent)3 Label (org.eclipse.swt.widgets.Label)3 TableItem (org.eclipse.swt.widgets.TableItem)3 NavigatorDecoratingLabelProvider (org.eclipse.ui.internal.navigator.NavigatorDecoratingLabelProvider)3 EImage (org.talend.commons.ui.runtime.image.EImage)3 ERepositoryObjectType (org.talend.core.model.repository.ERepositoryObjectType)3 LabelProvider (org.eclipse.jface.viewers.LabelProvider)2 MouseAdapter (org.eclipse.swt.events.MouseAdapter)2 MouseEvent (org.eclipse.swt.events.MouseEvent)2 Color (org.eclipse.swt.graphics.Color)2 Button (org.eclipse.swt.widgets.Button)2 Text (org.eclipse.swt.widgets.Text)2 Item (org.talend.core.model.properties.Item)2