@Override protected Control createContents(Composite parent) { keyTable = new Table(parent, SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.CHECK); CommonFuncUtilities.drawTableWithCheck(parent, keyTable, LinkSortKey.keysForOWLPro, keySetPro); CommonFuncUtilities.copyHashMapToHashMap(keySetPro, beforeAction); Composite bottomComp = new Composite(parent, SWT.NONE); bottomComp.setLayout(new GridLayout(4, true)); bottomComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); selectAll = new Button(bottomComp, SWT.NONE); selectAll.setText("Select All"); selectAll.setEnabled(true); selectAll.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { beforeAction.clear(); for (TableItem item : keyTable.getItems()) { item.setChecked(true); String key = item.getText(1).toString(); String des = LinkSortKey.keysForOWLPro.get(key); beforeAction.put(key, des); } } }); deselectAll = new Button(bottomComp, SWT.NONE); deselectAll.setText("Deselect All"); deselectAll.addSelectionListener( new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { for (TableItem item : keyTable.getItems()) { item.setChecked(false); } beforeAction.clear(); } }); return parent; }