本文整理汇总了Java中org.eclipse.draw2d.geometry.Rectangle.getCopy方法的典型用法代码示例。如果您正苦于以下问题:Java Rectangle.getCopy方法的具体用法?Java Rectangle.getCopy怎么用?Java Rectangle.getCopy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.draw2d.geometry.Rectangle
的用法示例。
在下文中一共展示了Rectangle.getCopy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CommentBoxSetConstraintCommand
import org.eclipse.draw2d.geometry.Rectangle; //导入方法依赖的package包/类
/**
* Create a command that can resize and/or move a shape.
*
* @param shape the shape to manipulate
* @param request the move and resize request
* @param newBounds the new size and location
* @throws IllegalArgumentException if any of the parameters is null
*/
public CommentBoxSetConstraintCommand(CommentBox shape, ChangeBoundsRequest request, Rectangle newBounds) {
if (shape == null || request == null || newBounds == null) {
throw new IllegalArgumentException();
}
this.shape = shape;
this.request = request;
this.newBounds = newBounds.getCopy();
this.newSize = newBounds.getSize();
setLabel("move / resize");
}
示例2: ComponentSetConstraintCommand
import org.eclipse.draw2d.geometry.Rectangle; //导入方法依赖的package包/类
/**
* Create a command that can resize and/or move a shape.
*
* @param shape the shape to manipulate
* @param request the move and resize request
* @param newBounds the new size and location
* @throws IllegalArgumentException if any of the parameters is null
*/
public ComponentSetConstraintCommand(Component shape, ChangeBoundsRequest request, Rectangle newBounds) {
if (shape == null || request == null || newBounds == null) {
throw new IllegalArgumentException();
}
this.shape = shape;
this.request = request;
this.newBounds = newBounds.getCopy();
setLabel("move / resize");
}
示例3: TableLayoutCommand
import org.eclipse.draw2d.geometry.Rectangle; //导入方法依赖的package包/类
public TableLayoutCommand(Table table, ChangeBoundsRequest req, Rectangle newBounds) {
if (table == null || req == null || newBounds == null) {
throw new IllegalArgumentException();
}
this.table = table;
this.request = req;
this.newBounds = newBounds.getCopy();
setLabel("Table Move/Resize");
}