@Test public void testGetElementWithNullIndex() { assertNull(CanvasLayoutUtils.getElement(abstractCanvasHandler, NODE_UUID)); }
@SuppressWarnings("unchecked") public static Element<? extends Definition<?>> getElement(final AbstractCanvasHandler canvasHandler, final String uuid) { if (Objects.isNull(canvasHandler) || Objects.isNull(uuid)) { return null; } final Index<?, ?> index = canvasHandler.getGraphIndex(); if (Objects.isNull(index)) { return null; } return index.get(uuid); }
CanvasLayoutUtils { @SuppressWarnings("unchecked") public static Element<? extends Definition<?>> getElement(final AbstractCanvasHandler canvasHandler, final String uuid) { if (Objects.isNull(canvasHandler) || Objects.isNull(uuid)) { return null; } final Index<?, ?> index = canvasHandler.getGraphIndex(); if (Objects.isNull(index)) { return null; } return index.get(uuid); } }
CanvasLayoutUtils { @SuppressWarnings("unchecked") public static Element<? extends Definition<?>> getElement(final AbstractCanvasHandler canvasHandler, final String uuid) { if (Objects.isNull(canvasHandler) || Objects.isNull(uuid)) { return null; } final Index<?, ?> index = canvasHandler.getGraphIndex(); if (Objects.isNull(index)) { return null; } return index.get(uuid); } @Inject  CanvasLayoutUtils(final GraphBoundsIndexer graphBoundsIndexer); }
CanvasLayoutUtils { @SuppressWarnings("unchecked") public static Element<? extends Definition<?>> getElement(final AbstractCanvasHandler canvasHandler, final String uuid) { if (Objects.isNull(canvasHandler) || Objects.isNull(uuid)) { return null; } final Index<?, ?> index = canvasHandler.getGraphIndex(); if (Objects.isNull(index)) { return null; } return index.get(uuid); } @Inject  CanvasLayoutUtils(final GraphBoundsIndexer graphBoundsIndexer); static boolean isCanvasRoot(final Diagram diagram,
                                       final Element parent); static boolean isCanvasRoot(final Diagram diagram,
                                       final String pUUID); static int getPaddingX(); static int getPaddingY(); @PreDestroy void destroy(); @SuppressWarnings("unchecked") Point2D getNext(final AbstractCanvasHandler canvasHandler,
                           final Node<View<?>, Edge> root,
                           final Node<View<?>, Edge> newNode); @SuppressWarnings("unchecked") Point2D getNext(final AbstractCanvasHandler canvasHandler,
                           final Node<View<?>, Edge> root,
                           final double rootNodeWidth,
                           final double rootNodeHeight,
                           final double newNodeWidth,
                           final double newNodeHeight,
                           Point2D offset,
                           Point2D rootNodeCoordinates
    ); @SuppressWarnings("unchecked") static Element<? extends Definition<?>> getElement(final AbstractCanvasHandler canvasHandler,
                                                              final String uuid); static void fireElementSelectedEvent(final Event<CanvasSelectionEvent> selectionEvent,
                                                final AbstractCanvasHandler canvasHandler,
                                                final String uuid); }
CanvasLayoutUtils { @SuppressWarnings("unchecked") public static Element<? extends Definition<?>> getElement(final AbstractCanvasHandler canvasHandler, final String uuid) { if (Objects.isNull(canvasHandler) || Objects.isNull(uuid)) { return null; } final Index<?, ?> index = canvasHandler.getGraphIndex(); if (Objects.isNull(index)) { return null; } return index.get(uuid); } @Inject  CanvasLayoutUtils(final GraphBoundsIndexer graphBoundsIndexer); static boolean isCanvasRoot(final Diagram diagram,
                                       final Element parent); static boolean isCanvasRoot(final Diagram diagram,
                                       final String pUUID); static int getPaddingX(); static int getPaddingY(); @PreDestroy void destroy(); @SuppressWarnings("unchecked") Point2D getNext(final AbstractCanvasHandler canvasHandler,
                           final Node<View<?>, Edge> root,
                           final Node<View<?>, Edge> newNode); @SuppressWarnings("unchecked") Point2D getNext(final AbstractCanvasHandler canvasHandler,
                           final Node<View<?>, Edge> root,
                           final double rootNodeWidth,
                           final double rootNodeHeight,
                           final double newNodeWidth,
                           final double newNodeHeight,
                           Point2D offset,
                           Point2D rootNodeCoordinates
    ); @SuppressWarnings("unchecked") static Element<? extends Definition<?>> getElement(final AbstractCanvasHandler canvasHandler,
                                                              final String uuid); static void fireElementSelectedEvent(final Event<CanvasSelectionEvent> selectionEvent,
                                                final AbstractCanvasHandler canvasHandler,
                                                final String uuid);  }