WindowProperty.java 文件源码

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

项目:kettle-trunk 作者:
/**
 * This method is needed in the case where the display has multiple monitors, but
 * they do not form a uniform rectangle.  In this case, it is possible for Geometry.moveInside()
 * to not detect that the window is partially or completely clipped.
 * We check to make sure at least the upper left portion of the rectangle is visible to give the
 * user the ability to reposition the dialog in this rare case. 
 * @param constrainee
 * @param display
 * @return
 */
private boolean isClippedByUnalignedMonitors(Rectangle constrainee, Display display)
{
    boolean isClipped;
    Monitor[] monitors = display.getMonitors();
    if (monitors.length > 0)
    {
        // Loop searches for a monitor proving false
        isClipped = true;
        for (Monitor monitor : monitors)
        {
            if (monitor.getClientArea().contains(constrainee.x + 10, constrainee.y + 10))
            {
                isClipped = false;
                break;
            }
        }
    }
    else
    {
        isClipped = false;
    }

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


问题


面经


文章

微信
公众号

扫码关注公众号