一,jface
1.内容器
表格:class TableViewerContentProvider implements IStructuredContentProvider
树: class TreeViewerContentProvider implements ITreeContentProvider
2.标签器
表格:class TableViewerLabelProvider implements ITableLabelProvider
树: class TreeViewerLableProvider implements ILabelProvider
二,加上右键菜单(Action类<ActionContributionItem类>、ActionGroup类、MenuManager类)
1,actionGroup类
class MyActionGroup extends ActionGroup
2,action类
class OpenAction extends Action
class RefreshAction extends Action
三,排序(ViewerSorter类)
class MySorter extends ViewerSorter
四,用ViewForm做布局调整
shell.setLayout(new FillLayout());
ViewForm viewForm = new ViewForm(shell, SWT.NONE); //布局基座ViewForm
viewForm.setLayout(new FillLayout());
final TableViewer tv = new TableViewer(viewForm, SW… //父容器由shell改为viewForm
五,