javax.swing.JComponent.isAncestorOf()方法的使用及代码示例

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

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

JComponent.isAncestorOf介绍

暂无

代码示例

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

void setOriginalFocusOwner() {
  Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
  if (focusOwner != null && component.isAncestorOf(focusOwner)) {
    originalFocusOwner = new WeakReference<Component>(focusOwner);
  } else {
    originalFocusOwner = new WeakReference<Component>(component);
  }
}

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

private boolean checkFocused(JComponent c) {
  Component focused = KeyboardFocusManager.getCurrentKeyboardFocusManager().getPermanentFocusOwner();
  boolean result = c == focused;
  if (!result) {
    result = c.isAncestorOf(focused);
  }
  return result;
}

代码示例来源:origin: threerings/tripleplay

JavaNativeOverlay findOverlayFor (Component comp) {
  for (JavaNativeOverlay overlay : _overlays) {
    if (overlay.component.isAncestorOf(comp)) return overlay;
  }
  return null;
}

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

private boolean checkFocused(JComponent c) {
  Component focused =
    KeyboardFocusManager.getCurrentKeyboardFocusManager().getPermanentFocusOwner();
  boolean result = c == focused;
  if (!result) {
    result = c.isAncestorOf(focused);
  }
  return result;
}

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

private boolean checkFocused(JComponent c) {
  Component focused =
    KeyboardFocusManager.getCurrentKeyboardFocusManager().getPermanentFocusOwner();
  boolean result = c == focused;
  if (!result) {
    result = c.isAncestorOf(focused);
  }
  return result;
}

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

getTop().isAncestorOf( (Component)captionedPanel ) )

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

getTop().isAncestorOf( (Component)captionedPanel ) )

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

JComponent comp = ie.getComponent();
if (comp == c) return true;
if (comp.isAncestorOf(c)) return true;

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

JComponent comp = ie.getComponent();
if (comp == c) return true;
if (comp.isAncestorOf(c)) return true;

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

if (comp.isAncestorOf(c)) {
  return true;

相关文章

JComponent类方法