作者热门文章
- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我创建了一个 JFace ListSelectionDialog,如下所示。
final ListSelectionDialog dialog = new ListSelectionDialog(
PlatformUI.getWorkbench().getDisplay().getActiveShell(),
List<SomeClass>,
new ArrayContentProvider(),
new LabelProvider(),
""); //$NON-NLS-1$
dialog.setTitle("Dialog Title"); //$NON-NLS-1$
dialog.setMessage("SomeMessage"); //$NON-NLS-1$
dialog.open();
对话框显示正常。
但是,我希望所有的复选框都被选中。我该怎么做?
最佳答案
List elementsToSelect = ...
dialog.setInitialElementSelections(elementsToSelect);
关于java - JFace问题: How do I select all items in a ListSelectionDialog?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1045362/
我是一名优秀的程序员,十分优秀!