javax.swing.JTree.requestFocus()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(117)

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

JTree.requestFocus介绍

暂无

代码示例

代码示例来源:origin: skylot/jadx

private void syncWithEditor() {
  ContentPanel selectedContentPanel = tabbedPane.getSelectedCodePanel();
  if (selectedContentPanel == null) {
    return;
  }
  JNode node = selectedContentPanel.getNode();
  if (node.getParent() == null && treeRoot != null) {
    // node not register in tree
    node = treeRoot.searchClassInTree(node);
    if (node == null) {
      LOG.error("Class not found in tree");
      return;
    }
  }
  TreeNode[] pathNodes = treeModel.getPathToRoot(node);
  if (pathNodes == null) {
    return;
  }
  TreePath path = new TreePath(pathNodes);
  tree.setSelectionPath(path);
  tree.makeVisible(path);
  tree.scrollPathToVisible(path);
  tree.requestFocus();
}

代码示例来源:origin: org.netbeans.api/org-openide-explorer

/** Requests focus for the tree component. Overrides superclass method. */
@Override
public void requestFocus() {
  tree.requestFocus();
}

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

/**
 * Changes focus to tree.
 */
@Override
public void requestFocus() {
  tree.requestFocus();
}

代码示例来源:origin: javax.help/javahelp

/**
 * Invoked when the component has been made visible.
 */
public void componentShown(ComponentEvent e) {
  tree.requestFocus();
}

代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit

public void run()
  {
    resultTree.requestFocus();
  }
});

代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/openide

/** Requests focus for the tree component. Overrides superclass method. */
public void requestFocus () {
  tree.requestFocus();
}

代码示例来源:origin: realXuJiang/bigtable-sql

public void requestFocus()
{
 _tree.requestFocus();
}

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

public void requestFocus()
{
 _tree.requestFocus();
}

代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide

/** Requests focus for the tree component. Overrides superclass method. */
public void requestFocus () {
  tree.requestFocus();
}

代码示例来源:origin: org.bitbucket.goalhub.simpleide/jedit

public void focusOnDefaultComponent()
{
  resultTree.requestFocus();
} //}}}

代码示例来源:origin: org.gosu-lang.gosu/gosu-editor

public void displayContextMenu( JTree tree, int x, int y, Component eventSource )
{
 tree.requestFocus();
 getContextMenu( tree ).show( tree, x, y );
}

代码示例来源:origin: org.gosu-lang.gosu/gosu-lab

public void displayContextMenu( JTree tree, int x, int y, Component eventSource )
{
 tree.requestFocus();
 getContextMenu( tree ).show( tree, x, y );
}

代码示例来源:origin: com.mgmtp.jfunk/jfunk-core

@Override
  public void run() {
    final JFunkFrame frame = new JFunkFrame(roots);
    frame.setUpGui();
    frame.setVisible(true);
    frame.tree.requestFocus();
  }
};

代码示例来源:origin: org.gosu-lang.gosu/gosu-lab

public void displayContextMenu( MessageTree message, int x, int y, Component eventSource )
{
 message.getTree().requestFocus();
 getContextMenu( message ).show( message.getTree(), x, y );
}

代码示例来源:origin: org.gosu-lang.gosu/gosu-lab

public void displayContextMenu( SearchTree search, int x, int y, Component eventSource )
{
 search.getTree().requestFocus();
 getContextMenu( search ).show( search.getTree(), x, y );
}

代码示例来源:origin: org.icepdf.os/icepdf-viewer

/**
 * SwingController takes AWT/Swing events, and maps them to its own events
 * related to PDF Document manipulation
 */
public void valueChanged(TreeSelectionEvent e) {
  if (outlinesTree == null)
    return;
  TreePath treePath = outlinesTree.getSelectionPath();
  if (treePath == null)
    return;
  OutlineItemTreeNode node = (OutlineItemTreeNode) treePath.getLastPathComponent();
  OutlineItem o = node.getOutlineItem();
  followOutlineItem(o);
  // return focus so that arrow keys will work on list
  outlinesTree.requestFocus();
}

代码示例来源:origin: net.sf.squirrel-sql.plugins/firebirdmanager

jtreeReceiver.requestFocus();
bSetPermissions = false;

代码示例来源:origin: google/sagetv

getTree().requestFocus();
javax.swing.tree.TreePath path =
  getClosestPathForLocation(getTree(), e.getX(), e.getY());

相关文章

JTree类方法