/**
* 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;
}
Canvas.java 文件源码
java
阅读 39
收藏 0
点赞 0
评论 0
项目:FreeCol
作者:
评论列表
文章目录