Search in sources :

Example 1 with LibListProvider

use of org.talend.componentdesigner.ui.composite.provider.LibListProvider in project tdi-studio-se by Talend.

the class LibSelectionComposite method createControl.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
     */
public void createControl(Composite parent) {
    Font font = parent.getFont();
    // Composite comp = new Composite(parent, SWT.NONE);
    GridLayout topLayout = new GridLayout();
    topLayout.numColumns = 2;
    this.setLayout(topLayout);
    GridData gd;
    // Label label = new Label(this, SWT.NONE);
    // label.setText("Libraries Selection:");
    // gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
    // gd.horizontalSpan = 2;
    // label.setLayoutData(gd);
    libListViewer = new LibListViewer(this);
    libListViewer.getControl().setFont(font);
    gd = new GridData(GridData.FILL_BOTH);
    // gd.horizontalSpan = 7;
    gd.heightHint = 100;
    gd.widthHint = 240;
    libListViewer.getControl().setLayoutData(gd);
    LibListProvider provider = new LibListProvider();
    libListViewer.setLabelProvider(provider);
    libListViewer.setContentProvider(provider);
    Composite pathButtonComp = new Composite(this, SWT.NONE);
    GridLayout pathButtonLayout = new GridLayout();
    pathButtonLayout.marginHeight = 0;
    pathButtonLayout.marginWidth = 0;
    pathButtonComp.setLayout(pathButtonLayout);
    gd = new GridData(GridData.FILL_HORIZONTAL);
    // gd.horizontalSpan = 2;
    pathButtonComp.setLayoutData(gd);
    pathButtonComp.setFont(font);
    createPathButtons(pathButtonComp);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) LibListProvider(org.talend.componentdesigner.ui.composite.provider.LibListProvider) Font(org.eclipse.swt.graphics.Font)

Aggregations

Font (org.eclipse.swt.graphics.Font)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Composite (org.eclipse.swt.widgets.Composite)1 LibListProvider (org.talend.componentdesigner.ui.composite.provider.LibListProvider)1