@Test public void testConvertToAbsoluteBoundsWhenChild() { final Node<View, Edge> parent = new NodeImpl<>(UUID.uuid()); final View parentView = new ViewImpl<>(new Decision(), Bounds.create(100, 200, 1000, 2000)); parent.setContent(parentView); final Node<View, Edge> child = new NodeImpl<>(UUID.uuid()); final View childView = new ViewImpl<>(new Decision(), Bounds.create(10, 20, 50, 60)); child.setContent(childView); final Edge<Child, Node> edge = new EdgeImpl<>(UUID.uuid()); edge.setContent(new Child()); edge.setSourceNode(parent); edge.setTargetNode(child); parent.getOutEdges().add(edge); child.getInEdges().add(edge); PointUtils.convertToAbsoluteBounds(child); final Bound ulBound = child.getContent().getBounds().getUpperLeft(); final Bound lrBound = child.getContent().getBounds().getLowerRight(); assertThat(ulBound.getX()).isEqualTo(110); assertThat(ulBound.getY()).isEqualTo(220); assertThat(lrBound.getX()).isEqualTo(150); assertThat(lrBound.getY()).isEqualTo(260); }
public static void convertToAbsoluteBounds(final Node<?, ?> targetNode) { convertBounds(targetNode, (base, delta) -> base + delta); }
PointUtils { public static void convertToAbsoluteBounds(final Node<?, ?> targetNode) { convertBounds(targetNode, (base, delta) -> base + delta); } }
PointUtils { public static void convertToAbsoluteBounds(final Node<?, ?> targetNode) { convertBounds(targetNode, (base, delta) -> base + delta); } private  PointUtils(); }
PointUtils { public static void convertToAbsoluteBounds(final Node<?, ?> targetNode) { convertBounds(targetNode, (base, delta) -> base + delta); } private  PointUtils(); static org.kie.dmn.model.api.dmndi.Point point2dToDMNDIPoint(org.kie.workbench.common.stunner.core.graph.content.view.Point2D point2d); static org.kie.workbench.common.stunner.core.graph.content.view.Point2D dmndiPointToPoint2D(org.kie.dmn.model.api.dmndi.Point dmndiPoint); static void convertToAbsoluteBounds(final Node<?, ?> targetNode); static void convertToRelativeBounds(final Node<?, ?> targetNode); static double xOfShape(final DMNShape shape); static double yOfShape(final DMNShape shape); static double widthOfShape(final DMNShape shape); static double heightOfShape(final DMNShape shape); static Bound upperLeftBound(final View view); static Bound lowerRightBound(final View view); static double xOfBound(final Bound bound); static double yOfBound(final Bound bound); }
PointUtils { public static void convertToAbsoluteBounds(final Node<?, ?> targetNode) { convertBounds(targetNode, (base, delta) -> base + delta); } private  PointUtils(); static org.kie.dmn.model.api.dmndi.Point point2dToDMNDIPoint(org.kie.workbench.common.stunner.core.graph.content.view.Point2D point2d); static org.kie.workbench.common.stunner.core.graph.content.view.Point2D dmndiPointToPoint2D(org.kie.dmn.model.api.dmndi.Point dmndiPoint); static void convertToAbsoluteBounds(final Node<?, ?> targetNode); static void convertToRelativeBounds(final Node<?, ?> targetNode); static double xOfShape(final DMNShape shape); static double yOfShape(final DMNShape shape); static double widthOfShape(final DMNShape shape); static double heightOfShape(final DMNShape shape); static Bound upperLeftBound(final View view); static Bound lowerRightBound(final View view); static double xOfBound(final Bound bound); static double yOfBound(final Bound bound);  }