本文整理了Java中javax.swing.JTree.isFocusOwner()
方法的一些代码示例,展示了JTree.isFocusOwner()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTree.isFocusOwner()
方法的具体详情如下:
包路径:javax.swing.JTree
类名称:JTree
方法名:isFocusOwner
暂无
代码示例来源:origin: org.netbeans.api/org-openide-explorer
public void mousePressed(MouseEvent e) {
wasFocusOwner = tree.isFocusOwner();
}
代码示例来源:origin: org.netbeans.api/org-openide-explorer
@Override
public boolean isEnabled() {
return treeTable.isFocusOwner() || tree.isFocusOwner();
}
};
代码示例来源:origin: org.netbeans.api/org-openide-explorer
/**
* Returns true if the action is enabled.
*
* @return true if the action is enabled, false otherwise
* @see Action#isEnabled
*/
@Override
public boolean isEnabled() {
return TreeView.this.isFocusOwner() || tree.isFocusOwner();
}
};
代码示例来源:origin: org.gephi/directory-chooser
/********** ActionListener impl, slow-double-click rename ******/
@Override
public void actionPerformed(ActionEvent e) {
if (tree.isFocusOwner() && isSelectionKept(pathToRename)) {
DirectoryNode node = (DirectoryNode)tree.getLastSelectedPathComponent();
if (node != null) {
applyEdit(node);
}
}
// clear
cancelRename();
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-languages
private void mark () {
if (tree.isFocusOwner ()) {
Node[] ns = TopComponent.getRegistry ().getActivatedNodes ();
if (ns.length == 1) {
EditorCookie editorCookie = ns [0].getLookup ().
lookup (EditorCookie.class);
if (editorCookie != null) {
TNode tn = (TNode) tree.getLastSelectedPathComponent ();
if (tn != null) {
ASTItem item = tn.getASTItem ();
if (item == null) return;
highlighting.highlight (
editorCookie.getDocument (),
item.getOffset (),
item.getEndOffset ()
);
return;
}
}
}
}
highlighting.removeHighlight ();
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-languages
private void mark () {
Node[] ns = TopComponent.getRegistry ().getActivatedNodes ();
if (ns.length == 1 && tree.isFocusOwner ()) {
EditorCookie editorCookie = ns [0].getLookup ().
lookup (EditorCookie.class);
if (editorCookie != null) {
THNode t = (THNode) tree.getLastSelectedPathComponent ();
if (t == null) return;
Token token = t.getToken ();
if (token == null) return;
// ASTToken stoken = ASTToken.create (
// t.getMimeType (),
// token.id ().ordinal (),
// token.text ().toString (),
// t.getOffset ()
// );
if (t != null) {
highlighting.highlight (
editorCookie.getDocument (),
t.getOffset (),
t.getOffset () + token.length ()
);
return;
}
}
}
highlighting.removeHighlight ();
}
代码示例来源:origin: khuxtable/seaglass
if (tree.isFocusOwner() && row == getLeadSelectionRow()) {
state |= FOCUSED;
内容来源于网络,如有侵权,请联系作者删除!