本文整理汇总了Java中org.eclipse.gef.requests.AlignmentRequest.setAlignmentRectangle方法的典型用法代码示例。如果您正苦于以下问题:Java AlignmentRequest.setAlignmentRectangle方法的具体用法?Java AlignmentRequest.setAlignmentRectangle怎么用?Java AlignmentRequest.setAlignmentRectangle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.gef.requests.AlignmentRequest
的用法示例。
在下文中一共展示了AlignmentRequest.setAlignmentRectangle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAlignmentCommand
import org.eclipse.gef.requests.AlignmentRequest; //导入方法依赖的package包/类
private Command createAlignmentCommand() {
final AlignmentRequest request = new AlignmentRequest(RequestConstants.REQ_ALIGN);
request.setAlignmentRectangle(calculateAlignmentRectangle(request));
request.setAlignment(alignment);
final List editparts = getOperationSet(request);
if (editparts.size() < 2)
return null;
final CompoundCommand command = new CompoundCommand();
command.setDebugLabel(getText());
for (int i = 0; i < editparts.size(); i++) {
final EditPart editpart = (EditPart) editparts.get(i);
command.add(editpart.getCommand(request));
}
return command;
}
示例2: createAlignmentCommand
import org.eclipse.gef.requests.AlignmentRequest; //导入方法依赖的package包/类
private Command createAlignmentCommand() {
AlignmentRequest request = new AlignmentRequest(
RequestConstants.REQ_ALIGN);
request.setAlignmentRectangle(calculateAlignmentRectangle(request));
request.setAlignment(alignment);
List editparts = getOperationSet(request);
if (editparts.size() < 2)
return null;
CompoundCommand command = new CompoundCommand();
command.setDebugLabel(getText());
for (int i = 0; i < editparts.size(); i++) {
EditPart editpart = (EditPart) editparts.get(i);
command.add(editpart.getCommand(request));
}
return command;
}
示例3: createAlignmentCommand
import org.eclipse.gef.requests.AlignmentRequest; //导入方法依赖的package包/类
private Command createAlignmentCommand() {
final AlignmentRequest request = new AlignmentRequest(RequestConstants.REQ_ALIGN);
request.setAlignmentRectangle(calculateAlignmentRectangle(request));
request.setAlignment(alignment);
final List<?> editparts = getOperationSet(request);
if (editparts.size() < 2)
return null;
final CompoundCommand command = new CompoundCommand();
command.setDebugLabel(getText());
for (int i = 0; i < editparts.size(); i++) {
final EditPart editpart = (EditPart) editparts.get(i);
command.add(editpart.getCommand(request));
}
return command;
}
示例4: getAlignCommand
import org.eclipse.gef.requests.AlignmentRequest; //导入方法依赖的package包/类
/**
* Returns the command contribution to an alignment request
*
* @param request
* the alignment request
* @return the contribution to the alignment
*/
protected Command getAlignCommand(AlignmentRequest request) {
AlignmentRequest req = new AlignmentRequest(REQ_ALIGN_CHILDREN);
req.setEditParts(getHost());
req.setAlignment(request.getAlignment());
req.setAlignmentRectangle(request.getAlignmentRectangle());
return getHost().getParent().getCommand(req);
}