@Test @SuppressWarnings("unchecked") public void testMoveViewConnectorsToTop() { ShapeUtils.moveViewConnectorsToTop(canvasHandler, instance2.parentNode); verify(edge1ShapeView, times(1)).moveToTop(); verify(edge2ShapeView, times(1)).moveToTop(); }
@SuppressWarnings("unchecked") public static void moveViewConnectorsToTop(final AbstractCanvasHandler canvasHandler, final Node<?, Edge> node) { final Set<String> connectorIds = new HashSet<>(); appendViewConnectorIds(connectorIds, node); new ChildrenTraverseProcessorImpl(new TreeWalkTraverseProcessorImpl()) .setRootUUID(node.getUUID()) .traverse(canvasHandler.getGraphIndex().getGraph(), new AbstractChildrenTraverseCallback<Node<View, Edge>, Edge<Child, Node>>() { @Override public boolean startNodeTraversal(final List<Node<View, Edge>> parents, final Node<View, Edge> childNode) { appendViewConnectorIds(connectorIds, childNode); return true; } }); connectorIds.forEach(id -> moveShapeToTop(canvasHandler, id)); }
ShapeUtils { @SuppressWarnings("unchecked") public static void moveViewConnectorsToTop(final AbstractCanvasHandler canvasHandler, final Node<?, Edge> node) { final Set<String> connectorIds = new HashSet<>(); appendViewConnectorIds(connectorIds, node); new ChildrenTraverseProcessorImpl(new TreeWalkTraverseProcessorImpl()) .setRootUUID(node.getUUID()) .traverse(canvasHandler.getGraphIndex().getGraph(), new AbstractChildrenTraverseCallback<Node<View, Edge>, Edge<Child, Node>>() { @Override public boolean startNodeTraversal(final List<Node<View, Edge>> parents, final Node<View, Edge> childNode) { appendViewConnectorIds(connectorIds, childNode); return true; } }); connectorIds.forEach(id -> moveShapeToTop(canvasHandler, id)); } }
ShapeUtils { @SuppressWarnings("unchecked") public static void moveViewConnectorsToTop(final AbstractCanvasHandler canvasHandler, final Node<?, Edge> node) { final Set<String> connectorIds = new HashSet<>(); appendViewConnectorIds(connectorIds, node); new ChildrenTraverseProcessorImpl(new TreeWalkTraverseProcessorImpl()) .setRootUUID(node.getUUID()) .traverse(canvasHandler.getGraphIndex().getGraph(), new AbstractChildrenTraverseCallback<Node<View, Edge>, Edge<Child, Node>>() { @Override public boolean startNodeTraversal(final List<Node<View, Edge>> parents, final Node<View, Edge> childNode) { appendViewConnectorIds(connectorIds, childNode); return true; } }); connectorIds.forEach(id -> moveShapeToTop(canvasHandler, id)); }  }
ShapeUtils { @SuppressWarnings("unchecked") public static void moveViewConnectorsToTop(final AbstractCanvasHandler canvasHandler, final Node<?, Edge> node) { final Set<String> connectorIds = new HashSet<>(); appendViewConnectorIds(connectorIds, node); new ChildrenTraverseProcessorImpl(new TreeWalkTraverseProcessorImpl()) .setRootUUID(node.getUUID()) .traverse(canvasHandler.getGraphIndex().getGraph(), new AbstractChildrenTraverseCallback<Node<View, Edge>, Edge<Child, Node>>() { @Override public boolean startNodeTraversal(final List<Node<View, Edge>> parents, final Node<View, Edge> childNode) { appendViewConnectorIds(connectorIds, childNode); return true; } }); connectorIds.forEach(id -> moveShapeToTop(canvasHandler, id)); }  @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 { @SuppressWarnings("unchecked") public static void moveViewConnectorsToTop(final AbstractCanvasHandler canvasHandler, final Node<?, Edge> node) { final Set<String> connectorIds = new HashSet<>(); appendViewConnectorIds(connectorIds, node); new ChildrenTraverseProcessorImpl(new TreeWalkTraverseProcessorImpl()) .setRootUUID(node.getUUID()) .traverse(canvasHandler.getGraphIndex().getGraph(), new AbstractChildrenTraverseCallback<Node<View, Edge>, Edge<Child, Node>>() { @Override public boolean startNodeTraversal(final List<Node<View, Edge>> parents, final Node<View, Edge> childNode) { appendViewConnectorIds(connectorIds, childNode); return true; } }); connectorIds.forEach(id -> moveShapeToTop(canvasHandler, id)); }  @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);  }