Canvas.java 文件源码

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

项目:FreeCol 作者:
/**
 * Checks if this {@code Canvas} contains any in game components.
 *
 * @return {@code true} if there is any in game components.
 */
public boolean containsInGameComponents() {
    KeyListener[] keyListeners = getKeyListeners();
    if (keyListeners.length > 0) {
        return true;
    }

    MouseListener[] mouseListeners = getMouseListeners();
    if (mouseListeners.length > 0) {
        return true;
    }

    MouseMotionListener[] mouseMotionListeners = getMouseMotionListeners();
    if (mouseMotionListeners.length > 0) {
        return true;
    }

    return false;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号