javax.swing.text.JTextComponent.getTopLevelAncestor()方法的使用及代码示例

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

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

JTextComponent.getTopLevelAncestor介绍

暂无

代码示例

代码示例来源:origin: protegeproject/protege

/**
   * Called when the hierarchy has been changed. To discern the actual
   * type of change, call <code>HierarchyEvent.getChangeFlags()</code>.
   * @see java.awt.event.HierarchyEvent#getChangeFlags()
   */
  public void hierarchyChanged(HierarchyEvent e) {
    if ((e.getChangeFlags() & HierarchyEvent.PARENT_CHANGED) != 0) {
      createPopupWindow();
      Container frame = textComponent.getTopLevelAncestor();
      if (frame != null){
        frame.addComponentListener(componentListener);
      }
    }
  }
};

代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl

/**
   * Called when the hierarchy has been changed. To discern the actual
   * type of change, call <code>HierarchyEvent.getChangeFlags()</code>.
   * @see java.awt.event.HierarchyEvent#getChangeFlags()
   */
  public void hierarchyChanged(HierarchyEvent e) {
    if ((e.getChangeFlags() & HierarchyEvent.PARENT_CHANGED) != 0) {
      createPopupWindow();
      Container frame = textComponent.getTopLevelAncestor();
      if (frame != null){
        frame.addComponentListener(componentListener);
      }
    }
  }
};

代码示例来源:origin: edu.stanford.protege/protege-editor-owl

/**
   * Called when the hierarchy has been changed. To discern the actual
   * type of change, call <code>HierarchyEvent.getChangeFlags()</code>.
   * @see java.awt.event.HierarchyEvent#getChangeFlags()
   */
  public void hierarchyChanged(HierarchyEvent e) {
    if ((e.getChangeFlags() & HierarchyEvent.PARENT_CHANGED) != 0) {
      createPopupWindow();
      Container frame = textComponent.getTopLevelAncestor();
      if (frame != null){
        frame.addComponentListener(componentListener);
      }
    }
  }
};

代码示例来源:origin: org.protege/protege-editor-owl

/**
   * Called when the hierarchy has been changed. To discern the actual
   * type of change, call <code>HierarchyEvent.getChangeFlags()</code>.
   * @see java.awt.event.HierarchyEvent#getChangeFlags()
   */
  public void hierarchyChanged(HierarchyEvent e) {
    if ((e.getChangeFlags() & HierarchyEvent.PARENT_CHANGED) != 0) {
      createPopupWindow();
      Container frame = textComponent.getTopLevelAncestor();
      if (frame != null){
        frame.addComponentListener(componentListener);
      }
    }
  }
};

相关文章

JTextComponent类方法