【发布时间】:2011-12-11 19:52:29
【问题描述】:
我尝试使用 org.eclipse.jface.viewers.CheckboxTableViewer 作为 org.eclipse.jface.wizard.WizardPage 的组件。我是这样创建的:
public void createControl(Composite parent) {
composite = new Composite(parent, SWT.NULL);
final GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 2;
composite.setLayout(gridLayout);
setControl(composite);
/* CheckboxTableViewer */
viewer = CheckboxTableViewer.newCheckList(composite, SWT.BORDER);
final Table table = viewer.getTable();
GridData data1 = new GridData();
data1.grabExcessHorizontalSpace = true;
data1.grabExcessVerticalSpace = true;
data1.horizontalSpan = 2;
data1.horizontalAlignment = SWT.FILL;
data1.verticalAlignment = SWT.FILL;
table.setLayoutData(data1);
table.setHeaderVisible(true);
table.setLinesVisible(true);
checkboxColumn = new TableColumn(table, SWT.LEFT);
...
查看器的内容由内容提供者动态插入。在 gnome 上一切正常。在 Windows 7(64 位和 32 位)上对此进行测试时,我无法选择该视图的任何条目。鼠标点击似乎对视图没有影响。 我在表格中添加了一个 mouselistener,并且触发了 mouseUp-/Down 事件,没有触发查看器上的 selectionChanged 和 doubleClick。谁能向我解释这种行为?
提前谢谢,
哈格
(我已经在 eclipse 论坛上发布了这个问题,还没有任何回应:http://www.eclipse.org/forums/index.php/t/250953/)
【问题讨论】:
标签: java eclipse windows-7 rcp jface