MungePen.java 文件源码

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

项目:power-matchmaker 作者:
/**
 * Removes all listeners associated with the given Component. This is useful when removing to to make sure
 * it does not stick around.
 */
public static void removeAllListeners(Component com) {
    for (FocusListener fl : com.getFocusListeners()) {
        com.removeFocusListener(fl);
    }

    for (MouseListener ml : com.getMouseListeners()) {
        com.removeMouseListener(ml);
    }

    for (MouseMotionListener mml : com.getMouseMotionListeners()) {
        com.removeMouseMotionListener(mml);
    }

    for (KeyListener kl : com.getKeyListeners()) {
        com.removeKeyListener(kl);
    }

    for (ComponentListener cl : com.getComponentListeners()) {
        com.removeComponentListener(cl);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号