Search in sources :

Example 1 with PackageLabelProvider

use of org.talend.designer.runtime.visualization.internal.ui.properties.cpu.PackageLabelProvider in project tdi-studio-se by Talend.

the class ConfigurationDialog method createPackagesViewer.

/**
     * Creates the packages viewer.
     * 
     * @param parent The parent composite
     */
private void createPackagesViewer(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(2, false));
    composite.setLayoutData(new GridData(GridData.FILL_BOTH));
    Label label = new Label(composite, SWT.NONE);
    label.setText(Messages.profiledPackagesLabel);
    GridData gridData = new GridData();
    gridData.horizontalSpan = 2;
    label.setLayoutData(gridData);
    packagesViewer = new TableViewer(composite, SWT.BORDER | SWT.MULTI);
    packagesViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
    packagesViewer.setContentProvider(new ArrayContentProvider());
    packagesViewer.setLabelProvider(new PackageLabelProvider());
    packagesViewer.setInput(packages.toArray(new String[packages.size()]));
    createAddRemoveButtons(composite);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) Label(org.eclipse.swt.widgets.Label) ArrayContentProvider(org.eclipse.jface.viewers.ArrayContentProvider) TableViewer(org.eclipse.jface.viewers.TableViewer) PackageLabelProvider(org.talend.designer.runtime.visualization.internal.ui.properties.cpu.PackageLabelProvider)

Aggregations

ArrayContentProvider (org.eclipse.jface.viewers.ArrayContentProvider)1 TableViewer (org.eclipse.jface.viewers.TableViewer)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 Label (org.eclipse.swt.widgets.Label)1 PackageLabelProvider (org.talend.designer.runtime.visualization.internal.ui.properties.cpu.PackageLabelProvider)1