PopupListenerHandler.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:sqlpower-library 作者:
/**
* Returns true if the {@link Popup} this class handles is visible. Since
* there is no available method in the {@link Popup} class to check whether
* it is visible, it checks if listeners are attached to the owning frame or
* glass pane instead.
*/
  public boolean isPopupVisible() {
    ComponentListener[] componentListeners = owningFrame.getComponentListeners();
    if (Arrays.asList(componentListeners).contains(resizeListener)) {
        return true;
    }

    MouseListener[] mouseListeners = glassPane.getMouseListeners();
    if (Arrays.asList(mouseListeners).contains(clickListener)) {
        return true;
    }

    return false;

  }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号