@Test public void testEnforceLocationConstraints() { ShapeViewExtStub shape = spy(new ShapeViewExtStub()); Bounds bounds = mock(Bounds.class); ShapeUtils.enforceLocationConstraints(shape, bounds); verify(shape, times(1)).setDragBounds(eq(bounds)); }
public static void enforceLocationConstraints(final ShapeView shape, final Bounds bounds) { if (shape instanceof HasDragBounds) { ((HasDragBounds) shape).setDragBounds(bounds); } }
ShapeUtils { public static void enforceLocationConstraints(final ShapeView shape, final Bounds bounds) { if (shape instanceof HasDragBounds) { ((HasDragBounds) shape).setDragBounds(bounds); } } }
ShapeUtils { public static void enforceLocationConstraints(final ShapeView shape, final Bounds bounds) { if (shape instanceof HasDragBounds) { ((HasDragBounds) shape).setDragBounds(bounds); } }  }
ShapeUtils { public static void enforceLocationConstraints(final ShapeView shape, final Bounds bounds) { if (shape instanceof HasDragBounds) { ((HasDragBounds) shape).setDragBounds(bounds); } }  @SuppressWarnings("unchecked") static void applyConnections(final Edge<? extends ViewConnector<?>, Node> edge,
                                        final AbstractCanvasHandler canvasHandler,
                                        final MutationContext mutationContext); static ConnectorShape getConnectorShape(Edge edge, CanvasHandler canvasHandler); @SuppressWarnings("unchecked") static void updateEdgeConnections(final Edge<? extends ViewConnector<?>, Node> edge,
                                             final AbstractCanvasHandler context); @SuppressWarnings("unchecked") static void updateEdgeConnection(final AbstractCanvasHandler context,
                                            final Connection connection,
                                            final Node<? extends View<?>, Edge> node); static void enforceLocationConstraints(final ShapeView shape,
                                                  final Bounds bounds); @SuppressWarnings("unchecked") static void moveViewConnectorsToTop(final AbstractCanvasHandler canvasHandler,
                                               final Node<?, Edge> node); static double getRadiusForBoundingBox(final double width,
                                                 final double height); static void setSizeFromBoundingBox(final ShapeView view,
                                              final double boundingBoxWidth,
                                              final double boundingBoxHeight); static double dist(final double x0,
                              final double y0,
                              final double x1,
                              final double y1); }
ShapeUtils { public static void enforceLocationConstraints(final ShapeView shape, final Bounds bounds) { if (shape instanceof HasDragBounds) { ((HasDragBounds) shape).setDragBounds(bounds); } }  @SuppressWarnings("unchecked") static void applyConnections(final Edge<? extends ViewConnector<?>, Node> edge,
                                        final AbstractCanvasHandler canvasHandler,
                                        final MutationContext mutationContext); static ConnectorShape getConnectorShape(Edge edge, CanvasHandler canvasHandler); @SuppressWarnings("unchecked") static void updateEdgeConnections(final Edge<? extends ViewConnector<?>, Node> edge,
                                             final AbstractCanvasHandler context); @SuppressWarnings("unchecked") static void updateEdgeConnection(final AbstractCanvasHandler context,
                                            final Connection connection,
                                            final Node<? extends View<?>, Edge> node); static void enforceLocationConstraints(final ShapeView shape,
                                                  final Bounds bounds); @SuppressWarnings("unchecked") static void moveViewConnectorsToTop(final AbstractCanvasHandler canvasHandler,
                                               final Node<?, Edge> node); static double getRadiusForBoundingBox(final double width,
                                                 final double height); static void setSizeFromBoundingBox(final ShapeView view,
                                              final double boundingBoxWidth,
                                              final double boundingBoxHeight); static double dist(final double x0,
                              final double y0,
                              final double x1,
                              final double y1);  }