-
Notifications
You must be signed in to change notification settings - Fork 4
/
CComboPart.java
32 lines (25 loc) · 983 Bytes
/
CComboPart.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.xored.q7.quality.mockups.swt;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import com.xored.q7.quality.mockups.issues.BaseMockupPart;
public class CComboPart extends BaseMockupPart {
public Control construct(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridDataFactory.swtDefaults().align(SWT.FILL, SWT.FILL)
.grab(true, true).applyTo(composite);
GridLayoutFactory.swtDefaults().numColumns(2).applyTo(composite);
Label label = new Label(composite, SWT.NONE);
label.setText("Editable CCombo");
CCombo combo = new CCombo(composite, SWT.BORDER);
combo.setItems(new String[] { "One", "Two", "Three" });
return null;
}
public String getLabel() {
return "CCombo test";
}
}