exe*_*ecc 2 java swt jface treeviewer
我有和添加按钮,TableViewer在我的应用程序中.按下" 添加"按钮后,我将向模型中添加一个新元素,然后刷新该查看器.
问题是:如何在我的查看器中选择这个新添加的项目?
tableViewer.setSelection(new StructuredSelection(modelElement), true);
Run Code Online (Sandbox Code Playgroud)
将true在年底将会使表滚动到新选择的项目,如果需要的话.
| 归档时间: |
|
| 查看次数: |
2498 次 |
| 最近记录: |