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

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

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

Tree.setFocus介绍

暂无

代码示例

代码示例来源:origin: caoxinyu/RedisClient

if (dataItem.getText().equals(containers[i])) {
    tree.setSelection(dataItem);
    tree.setFocus();
    dbContainerTreeItemSelected(dataItem, refresh);
    dataItems = dataItem.getItems();
if (dataItem.getText().equals(container)) {
  tree.setSelection(dataItem);
  tree.setFocus();
  dbContainerTreeItemSelected(dataItem, refresh);
  dataItems = dataItem.getItems();

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

selectionTree.setFocus();
selectionTree.layout();
viewTreeComposite.layout( true, true );

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

wTree.setFocus();
BaseStepDialog.setSize( shell );

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

@Override
public void setFocus() {
  super.setFocus();
  fTree.setFocus();
}

代码示例来源:origin: org.apache.directory.studio/ldapbrowser.common

/**
 * Sets the focus to the tree viewer.
 */
public void setFocus()
{
  viewer.getTree().setFocus();
}

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

/**
 * {@inheritDoc}
 */
@Override
public void setFocus() {
  treeViewer.getTree().setFocus();
}

代码示例来源:origin: org.apache.directory.studio/ldapbrowser.common

/**
 * Sets focus to the table viewer.
 */
public void setFocus()
{
  viewer.getTree().setFocus();
}

代码示例来源:origin: org.eclipse.emf.cdo.transfer/ui

@Override
public boolean setFocus()
{
 return viewer.getTree().setFocus();
}

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

@Override
public void setFocus() {
  fTreeViewer.getTree().setFocus();
}

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

/**
 * <p>
 * Force the workbench to focus on the Common Navigator tree.
 * </p>
 * 
 * @see org.eclipse.ui.part.WorkbenchPart#setFocus()
 */
public void setFocus() {
  if (commonViewer != null) {
    commonViewer.getTree().setFocus();
  }
}

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

@Override
public void keyPressed(KeyEvent e) {
  if (e.keyCode == 0x0D || e.keyCode == SWT.KEYPAD_CR) // Enter key
    gotoSelectedElement();
  if (e.keyCode == SWT.ARROW_DOWN)
    fTreeViewer.getTree().setFocus();
  if (e.keyCode == SWT.ARROW_UP)
    fTreeViewer.getTree().setFocus();
  if (e.character == 0x1B) // ESC
    dispose();
}
@Override

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

public void keyPressed(KeyEvent e) {
  if (e.keyCode == 0x0D) // return
    gotoSelectedElement();
  if (e.keyCode == SWT.ARROW_DOWN)
    fTreeViewer.getTree().setFocus();
  if (e.keyCode == SWT.ARROW_UP)
    fTreeViewer.getTree().setFocus();
  if (e.character == 0x1B) // ESC
    dispose();
}
public void keyReleased(KeyEvent e) {

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

@Override
  public void keyTraversed(TraverseEvent e) {
    if (e.detail == SWT.TRAVERSE_MNEMONIC && e.doit) {
      e.detail= SWT.TRAVERSE_NONE;
      getTreeViewer().getTree().setFocus();
    }
  }
});

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

public void setVisible(boolean visible) {
    super.setVisible(visible);
    if (visible && fTreeViewer != null)
      fTreeViewer.getTree().setFocus();
  }
}

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

@Override
  public void run(IProgressMonitor monitor) throws CoreException {
    fPackageViewer.refresh();
    IStructuredSelection selection= new StructuredSelection(elements);
    fPackageViewer.setSelection(selection, true);
    fPackageViewer.getTree().setFocus();
    if (elements.size() == 1 && elements.get(0) instanceof IJavaProject)
      fPackageViewer.expandToLevel(elements.get(0), 1);
  }
}, ResourcesPlugin.getWorkspace().getRoot(), IWorkspace.AVOID_UPDATE, new NullProgressMonitor());

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

@Override
  public void setVisible(boolean visible) {
    super.setVisible(visible);
    if (visible && fTreeViewer != null)
      fTreeViewer.getTree().setFocus();
      if (!fTreeUpdated){
        fTreeViewer.getTree().getDisplay().asyncExec(new ValidTypesTask());
        fTreeUpdated= true;
      }
  }
}

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

@Override
  public void setVisible(boolean visible) {
    super.setVisible(visible);
    if (visible && fTreeViewer != null)
      fTreeViewer.getTree().setFocus();
      if (!fTreeUpdated){
        fTreeViewer.getTree().getDisplay().asyncExec(new ValidTypesTask());
        fTreeUpdated= true;
      }
  }
}

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

/**
 * {@inheritDoc}
 */
@Override
public void setFocus() {
  if (treeViewer.getTree().isVisible()) {
    treeViewer.getTree().setFocus();
  } else {
    mainForm.setFocus();
  }
}

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

/**
 * {@inheritDoc}
 */
@Override
public void setFocus() {
  if (treeViewer.getTree().isVisible()) {
    treeViewer.getTree().setFocus();
  } else {
    mainForm.setFocus();
  }
}

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

/**
 * {@inheritDoc}
 */
@Override
public void setFocus() {
  if (treeViewer.getTree().isVisible()) {
    treeViewer.getTree().setFocus();
  } else {
    mainForm.setFocus();
  }
}

相关文章

Tree类方法