org.eclipse.jface.util.Geometry.getSize()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中org.eclipse.jface.util.Geometry.getSize()方法的一些代码示例,展示了Geometry.getSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.getSize()方法的具体详情如下:
包路径:org.eclipse.jface.util.Geometry
类名称:Geometry
方法名:getSize

Geometry.getSize介绍

[英]Returns the size of the rectangle, as a Point
[中]以点的形式返回矩形的大小

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

/**
 * @param constrainee
 * @param container
 */
private void constrainRectangleToContainer( Rectangle constrainee, Rectangle container ) {
 Point originalSize = Geometry.getSize( constrainee );
 Point containerSize = Geometry.getSize( container );
 Point oversize = Geometry.subtract( originalSize, containerSize );
 if ( oversize.x > 0 ) {
  constrainee.width = originalSize.x - oversize.x;
 }
 if ( oversize.y > 0 ) {
  constrainee.height = originalSize.y - oversize.y;
 }
 // Detect if the dialog was positioned outside the container
 Geometry.moveInside( constrainee, container );
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

Point size= Geometry.getSize(controlBounds);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

Point size= Geometry.getSize(controlBounds);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

size= Geometry.getSize(bounds);
cropToClosestMonitor(controlBounds);
location= Geometry.getLocation(controlBounds);
size= Geometry.getSize(controlBounds);
informationControl.setLocation(location);
informationControl.setSize(size.x, size.y);

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

size= Geometry.getSize(bounds);
cropToClosestMonitor(controlBounds);
location= Geometry.getLocation(controlBounds);
size= Geometry.getSize(controlBounds);
informationControl.setLocation(location);
informationControl.setSize(size.x, size.y);

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

Geometry.set(controlSize, Geometry.getSize(bestBounds));
return Geometry.getLocation(bestBounds);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

Geometry.set(controlSize, Geometry.getSize(bestBounds));
return Geometry.getLocation(bestBounds);

相关文章