本文整理了Java中org.eclipse.swt.widgets.Tree.isFocusControl()
方法的一些代码示例,展示了Tree.isFocusControl()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.isFocusControl()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:isFocusControl
暂无
代码示例来源:origin: RepreZen/KaiZen-OpenAPI-Editor
@Override
public boolean isFocusControl() {
return treeViewer.getTree().isFocusControl() || filterText.isFocusControl();
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
private void openElement(Object data) {
if (data == null)
return;
// This might or might not open an editor
fParent.getViewer().fireMenuSelection(data);
boolean treeHasFocus= !fShell.isDisposed() && fDropDownViewer.getTree().isFocusControl();
if (JavaPlugin.DEBUG_BREADCRUMB_ITEM_DROP_DOWN) {
System.out.println(" isDisposed: " + fShell.isDisposed()); //$NON-NLS-1$
System.out.println(" shell hasFocus: " + (!fShell.isDisposed() && fShell.isFocusControl())); //$NON-NLS-1$
System.out.println(" tree hasFocus: " + treeHasFocus); //$NON-NLS-1$
}
if (fShell.isDisposed())
return;
if (!treeHasFocus) {
fShell.close();
return;
}
toggleExpansionState(data);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
private void openElement(Object data) {
if (data == null)
return;
// This might or might not open an editor
fParent.getViewer().fireMenuSelection(data);
boolean treeHasFocus= !fShell.isDisposed() && fDropDownViewer.getTree().isFocusControl();
if (JavaPlugin.DEBUG_BREADCRUMB_ITEM_DROP_DOWN) {
System.out.println(" isDisposed: " + fShell.isDisposed()); //$NON-NLS-1$
System.out.println(" shell hasFocus: " + (!fShell.isDisposed() && fShell.isFocusControl())); //$NON-NLS-1$
System.out.println(" tree hasFocus: " + treeHasFocus); //$NON-NLS-1$
}
if (fShell.isDisposed())
return;
if (!treeHasFocus) {
fShell.close();
return;
}
toggleExpansionState(data);
}
代码示例来源:origin: org.eclipse.mylyn.wikitext/ui
public boolean isFocusControl() {
return filteredTree.isFocusControl() || filteredTree.getFilterControl().isFocusControl()
|| filteredTree.getViewer().getTree().isFocusControl();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.debug.ui
/**
* Called when the given element was selected in the viewer. It causes the
* breadcrumb viewer to fire an opened event. If the viewer loses focus
* as a result of the open operation, then the drop-down is closed.
* Otherwise the selected element is expanded.
*
* @param selection The selection to open.
*/
protected void openElement(ISelection selection) {
if (selection == null || !(selection instanceof ITreeSelection) || selection.isEmpty()) {
return;
}
// This might or might not open an editor
fDropDownSite.notifySelection(selection);
Tree tree = fDropDownViewer.getTree();
boolean treeHasFocus= !tree.isDisposed() && tree.isFocusControl();
if (DebugUIPlugin.DEBUG_TREE_VIEWER_DROPDOWN) {
DebugUIPlugin.trace(" isDisposed: " + tree.isDisposed()); //$NON-NLS-1$
DebugUIPlugin.trace(" shell hasFocus: " + (!tree.isDisposed() && tree.isFocusControl())); //$NON-NLS-1$
DebugUIPlugin.trace(" tree hasFocus: " + treeHasFocus); //$NON-NLS-1$
}
if (tree.isDisposed()) {
return;
}
if (!treeHasFocus) {
fDropDownSite.close();
return;
}
toggleExpansionState( ((ITreeSelection)selection).getPaths()[0]);
}
代码示例来源:origin: BiglySoftware/BiglyBT
if (sidebar.getTree().isFocusControl()) {
color1 = ColorCache.getSchemedColor(gc.getDevice(), "#166688");
color2 = ColorCache.getSchemedColor(gc.getDevice(), "#1c2458");
内容来源于网络,如有侵权,请联系作者删除!