use of org.talend.designer.business.diagram.custom.commands.ChangeBusinessItemAlignmentCommand in project tdi-studio-se by Talend.
the class DiagramModelService method setBusinessItemAlignment.
public void setBusinessItemAlignment(BusinessAlignment alignment, BusinessAlignment alignmentGroup, Object part) {
if (part instanceof BusinessItemShapeEditPart) {
BusinessItem item = (BusinessItem) ((Node) ((BusinessItemShapeEditPart) part).getModel()).getElement();
ChangeBusinessItemAlignmentCommand command = new ChangeBusinessItemAlignmentCommand(item, alignment, alignmentGroup);
try {
command.execute(null, null);
} catch (ExecutionException e) {
}
((BusinessItemShapeEditPart) part).refreshVisuals();
}
}
Aggregations