CCSystem.java 文件源码

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

项目:FCMFrame 作者:
/**
 * Set whether the coordinate system is movable with the mouse, i.e.
 * the scope of the system changes as the the mouse is clicked, held
 * and dragged over the system.
 * 
 * @param movable
 *        If true, move is possible.
 */
public void setMovable(boolean movable) {
    if (this.movable && movable) return;
    if (!this.movable && !movable) return;

    if (movable) {
        addMouseListener(mouseListener);
        addMouseMotionListener((MouseMotionListener) mouseListener);
    }
    else {
        removeMouseListener(mouseListener);
        removeMouseMotionListener((MouseMotionListener) mouseListener);
    }

    movable = !movable;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号