Search in sources :

Example 1 with CommPortIdentifierLabelProvider

use of com.jopdesign.jopeclipse.internal.ui.CommPortIdentifierLabelProvider in project jop by jop-devel.

the class JOPDownloadTab method createCommPortViewer.

private void createCommPortViewer(Composite parent) {
    Group group = JOPUIUtils.createHorizontalGrabGroup(parent);
    group.setLayout(new GridLayout(2, false));
    group.setText("COM Port:");
    commPortViewer = new ComboViewer(group, SWT.SINGLE | SWT.READ_ONLY);
    commPortViewer.setContentProvider(new CommPortIdentifierContentProvider());
    commPortViewer.setInput(RXTXCommUtils.getAvailableSerialPorts());
    commPortViewer.setLabelProvider(new CommPortIdentifierLabelProvider());
    createVerticalSpacer(group, 1);
    useUsbButton = createCheckButton(group, "Download with USB");
    useUsbButton.addSelectionListener(listener);
    testConnectionButton = createPushButton(group, "Test connection", null);
    GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
    testConnectionButton.setLayoutData(gd);
}
Also used : Group(org.eclipse.swt.widgets.Group) GridLayout(org.eclipse.swt.layout.GridLayout) ComboViewer(org.eclipse.jface.viewers.ComboViewer) GridData(org.eclipse.swt.layout.GridData) CommPortIdentifierLabelProvider(com.jopdesign.jopeclipse.internal.ui.CommPortIdentifierLabelProvider) CommPortIdentifierContentProvider(com.jopdesign.jopeclipse.internal.ui.CommPortIdentifierContentProvider)

Aggregations

CommPortIdentifierContentProvider (com.jopdesign.jopeclipse.internal.ui.CommPortIdentifierContentProvider)1 CommPortIdentifierLabelProvider (com.jopdesign.jopeclipse.internal.ui.CommPortIdentifierLabelProvider)1 ComboViewer (org.eclipse.jface.viewers.ComboViewer)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 Group (org.eclipse.swt.widgets.Group)1