Shell shell = ( (TableViewer) tableView.getManagedObject() ).getTable().getShell(); MessageDialog md = new MessageDialog( shell,
Shell shell = ( (TableViewer) tableView.getManagedObject() ).getTable().getShell(); MessageDialog md = new MessageDialog( shell,
public Shell getShell() { return fTable.getShell(); }
/** * Close. */ /* * Close the window and dispose of resources */ public void close() { Shell shell = table.getShell(); if (shell != null && !shell.isDisposed()) shell.dispose(); }
private int computeScrollBarWidth() { Composite t= new Composite(fTable.getShell(), SWT.V_SCROLL); int result= t.computeTrim(0, 0, 0, 0).width; t.dispose(); return result; }
private int computeScrollBarWidth() { Composite t= new Composite(fTable.getShell(), SWT.V_SCROLL); int result= t.computeTrim(0, 0, 0, 0).width; t.dispose(); return result; }
private int computeScrollBarWidth() { Composite t= new Composite(fTable.getShell(), SWT.V_SCROLL); int result= t.computeTrim(0, 0, 0, 0).width; t.dispose(); return result; }
private int computeScrollBarWidth() { Composite t= new Composite(fTable.getShell(), SWT.V_SCROLL); int result= t.computeTrim(0, 0, 0, 0).width; t.dispose(); return result; }
public void addRange() { new IpFilterEditor(CoreFactory.getSingleton(),table.getShell(), null); //noChange = false; //refresh(); }
public void editRange(IpRange range) { new IpFilterEditor(CoreFactory.getSingleton(),table.getShell(), range); noChange = false; //refresh(); }
@Override protected Point computeLocation(Rectangle subjectArea, Point controlSize, Anchor anchor) { Point location= super.computeLocation(subjectArea, controlSize, anchor); /* * The location is computed using subjectControl.toDisplay(), which does not include the * trim of the subject control. As we want the additional info popup aligned with the outer * coordinates of the proposal popup, adjust this here */ Rectangle trim= fProposalTable.getShell().computeTrim(0, 0, 0, 0); location.x += trim.x; location.y += trim.y; return location; }
@Override protected Point computeLocation(Rectangle subjectArea, Point controlSize, Anchor anchor) { Point location= super.computeLocation(subjectArea, controlSize, anchor); /* * The location is computed using subjectControl.toDisplay(), which does not include the * trim of the subject control. As we want the additional info popup aligned with the outer * coordinates of the proposal popup, adjust this here */ Rectangle trim= fProposalTable.getShell().computeTrim(0, 0, 0, 0); location.x += trim.x; location.y += trim.y; return location; }
protected void handleCopy() { // Context menu selected: copy cell value to clipboard if (copyMenuClipboardText_ != null && copyMenuClipboardText_.length()>0) { Display display = table_.getShell().getDisplay(); Clipboard clipboard = new Clipboard(display); clipboard.setContents(new String[] {copyMenuClipboardText_}, new Transfer[] {TextTransfer.getInstance()}); clipboard.dispose(); } }
void removeSelected() { try { // get the confirmation first ConfirmationDialog confirmationDilaog = new ConfirmationDialog(tableViewer.getTable().getShell(), currentSelection.cert); if (confirmationDilaog.open() == ConfirmationDialog.YES) { activeTrustEngines[currentSelection.trustEngineIndex].removeTrustAnchor(currentSelection.cert); tableViewer.setInput(getCertificates()); removeBtn.setEnabled(false); } } catch (Exception e) { e.printStackTrace(); } }
@Override protected void computeInformation() { if (fProposal instanceof ICompletionProposalExtension3) setCustomInformationControlCreator(((ICompletionProposalExtension3) fProposal).getInformationControlCreator()); else setCustomInformationControlCreator(null); // compute subject area Point size= fProposalTable.getShell().getSize(); // set information & subject area setInformation(fInformation, new Rectangle(0, 0, size.x, size.y)); }
@Override protected void computeInformation() { if (fProposal instanceof ICompletionProposalExtension3) setCustomInformationControlCreator(((ICompletionProposalExtension3) fProposal).getInformationControlCreator()); else setCustomInformationControlCreator(null); // compute subject area Point size= fProposalTable.getShell().getSize(); // set information & subject area setInformation(fInformation, new Rectangle(0, 0, size.x, size.y)); }
protected void createSortMenu(String menuNames[]) { if (table == null) return; sortMenu = new Menu(table.getShell(), SWT.POP_UP); for (int x = 0; x < menuNames.length; x++) { MenuItem item = new MenuItem(sortMenu, SWT.PUSH); Integer ID = x; item.setData(ID); item.setText(menuNames[x]); item.addSelectionListener(this); } table.setMenu(sortMenu); }
private void addPopupMenu() { Menu menu= new Menu(fTable.getShell(), SWT.POP_UP); fTable.setMenu(menu); final MenuItem remove= new MenuItem(menu, SWT.NONE); remove.setText(JavaUIMessages.TypeInfoViewer_remove_from_history); menu.addMenuListener(new MenuAdapter() { public void menuShown(MenuEvent e) { TableItem[] selection= fTable.getSelection(); remove.setEnabled(canEnable(selection)); } }); remove.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { deleteHistoryEntry(); } }); }
private void addPopupMenu() { Menu menu= new Menu(fTable.getShell(), SWT.POP_UP); fTable.setMenu(menu); final MenuItem remove= new MenuItem(menu, SWT.NONE); remove.setText(JavaUIMessages.TypeInfoViewer_remove_from_history); menu.addMenuListener(new MenuAdapter() { @Override public void menuShown(MenuEvent e) { TableItem[] selection= fTable.getSelection(); remove.setEnabled(canEnable(selection)); } }); remove.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { deleteHistoryEntry(); } }); }
private void showDialog(final ISiteArchive archive) { final ISiteModel model = (ISiteModel) getPage().getModel(); BusyIndicator.showWhile(fTable.getDisplay(), () -> { NewArchiveDialog dialog = new NewArchiveDialog(fTable.getShell(), model, archive); dialog.create(); SWTUtil.setDialogSize(dialog, 400, -1); dialog.open(); }); }