use of org.eclipse.sapphire.ui.Bounds in project liferay-ide by liferay.
the class WorkflowDefinitionLayoutPersistenceService method _writeWorkflowNodeBoundsToMetaData.
private void _writeWorkflowNodeBoundsToMetaData(WorkflowNode workflowNode, DiagramNodePart nodePart) {
Bounds bounds = nodePart.getNodeBounds();
ElementHandle<WorkflowNodeMetadata> nodeMetadata = workflowNode.getMetadata();
WorkflowNodeMetadata metadata = nodeMetadata.content(true);
Position position = metadata.getPosition();
Value<Integer> valueX = position.getX();
if (bounds.getX() != valueX.content()) {
position.setX(bounds.getX());
}
Value<Integer> valueY = position.getY();
if (bounds.getY() != valueY.content()) {
position.setY(bounds.getY());
}
}
Aggregations