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