org.eclipse.swt.widgets.Table.getShell()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.7k)|赞(0)|评价(0)|浏览(176)

本文整理了Java中org.eclipse.swt.widgets.Table.getShell()方法的一些代码示例,展示了Table.getShell()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Table.getShell()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Table
类名称:Table
方法名:getShell

Table.getShell介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

Shell shell = ( (TableViewer) tableView.getManagedObject() ).getTable().getShell();
MessageDialog md =
 new MessageDialog( shell,

代码示例来源:origin: pentaho/pentaho-kettle

Shell shell = ( (TableViewer) tableView.getManagedObject() ).getTable().getShell();
MessageDialog md =
 new MessageDialog( shell,

代码示例来源:origin: cbeust/testng-eclipse

public Shell getShell() {
 return fTable.getShell();
}

代码示例来源:origin: org.apache.uima/uimaj-ep-pear-packager

/**
 * Close.
 */
/*
 * Close the window and dispose of resources
 */
public void close() {
 Shell shell = table.getShell();
 if (shell != null && !shell.isDisposed())
  shell.dispose();
}

代码示例来源:origin: org.eclipse/org.eclipse.ajdt.ui

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;
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

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;
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

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;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

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;
}

代码示例来源:origin: BiglySoftware/BiglyBT

public void addRange() {
 new IpFilterEditor(CoreFactory.getSingleton(),table.getShell(), null);
 //noChange = false;
 //refresh();
}

代码示例来源:origin: BiglySoftware/BiglyBT

public void editRange(IpRange range) {
 new IpFilterEditor(CoreFactory.getSingleton(),table.getShell(), range);
 noChange = false;
 //refresh();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

@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;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@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;
}

代码示例来源:origin: org.codehaus.openxma/xmartclient

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();
  }
}

代码示例来源:origin: org.eclipse.equinox.security/ui

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();
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

@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));
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

@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));
}

代码示例来源:origin: openaudible/openaudible

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);
}

代码示例来源:origin: org.eclipse/org.eclipse.ajdt.ui

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();
    }
  });
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

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();
    }
  });
}

代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui

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();
  });
}

相关文章

Table类方法