@Test public void testGetAreaAtFreePosition() { Node<View<?>, Edge> nodeFreePosition = canvasBoundsIndexerImpl.getAt(0, 600, 100, 10, parentNode); assertNull(nodeFreePosition); }
@Override @SuppressWarnings("unchecked") public Node<View<?>, Edge> getAt(final double x, final double y) { final WiresCanvas canvas = (WiresCanvas) canvasHandler.getAbstractCanvas(); final LienzoLayer lienzoLayer = canvas.getView().getLayer(); final String viewUUID = LienzoLayerUtils.getUUID_At(lienzoLayer, x, y); if (null != viewUUID && viewUUID.trim().length() > 0) { final Shape<?> shape = canvas.getShape(viewUUID); if (null != shape) { return canvasHandler.getGraphIndex().getNode(shape.getUUID()); } } return null; }
CanvasBoundsIndexerImpl implements CanvasBoundsIndexer<AbstractCanvasHandler> { @Override @SuppressWarnings("unchecked") public Node<View<?>, Edge> getAt(final double x, final double y) { final WiresCanvas canvas = (WiresCanvas) canvasHandler.getAbstractCanvas(); final LienzoLayer lienzoLayer = canvas.getView().getLayer(); final String viewUUID = LienzoLayerUtils.getUUID_At(lienzoLayer, x, y); if (null != viewUUID && viewUUID.trim().length() > 0) { final Shape<?> shape = canvas.getShape(viewUUID); if (null != shape) { return canvasHandler.getGraphIndex().getNode(shape.getUUID()); } } return null; } }
CanvasBoundsIndexerImpl implements CanvasBoundsIndexer<AbstractCanvasHandler> { @Override @SuppressWarnings("unchecked") public Node<View<?>, Edge> getAt(final double x, final double y) { final WiresCanvas canvas = (WiresCanvas) canvasHandler.getAbstractCanvas(); final LienzoLayer lienzoLayer = canvas.getView().getLayer(); final String viewUUID = LienzoLayerUtils.getUUID_At(lienzoLayer, x, y); if (null != viewUUID && viewUUID.trim().length() > 0) { final Shape<?> shape = canvas.getShape(viewUUID); if (null != shape) { return canvasHandler.getGraphIndex().getNode(shape.getUUID()); } } return null; }  }
CanvasBoundsIndexerImpl implements CanvasBoundsIndexer<AbstractCanvasHandler> { @Override @SuppressWarnings("unchecked") public Node<View<?>, Edge> getAt(final double x, final double y) { final WiresCanvas canvas = (WiresCanvas) canvasHandler.getAbstractCanvas(); final LienzoLayer lienzoLayer = canvas.getView().getLayer(); final String viewUUID = LienzoLayerUtils.getUUID_At(lienzoLayer, x, y); if (null != viewUUID && viewUUID.trim().length() > 0) { final Shape<?> shape = canvas.getShape(viewUUID); if (null != shape) { return canvasHandler.getGraphIndex().getNode(shape.getUUID()); } } return null; }  BoundsIndexer<AbstractCanvasHandler, Node<View<?>, Edge>> build(final AbstractCanvasHandler context); @Override @SuppressWarnings("unchecked") Node<View<?>, Edge> getAt(final double x,
                                     final double y); @Override @SuppressWarnings("unchecked") Node<View<?>, Edge> getAt(final double x,
                                     final double y,
                                     final double width,
                                     final double height,
                                     final Element parentNode); @Override double[] getTrimmedBounds(); @Override void destroy(); }
CanvasBoundsIndexerImpl implements CanvasBoundsIndexer<AbstractCanvasHandler> { @Override @SuppressWarnings("unchecked") public Node<View<?>, Edge> getAt(final double x, final double y) { final WiresCanvas canvas = (WiresCanvas) canvasHandler.getAbstractCanvas(); final LienzoLayer lienzoLayer = canvas.getView().getLayer(); final String viewUUID = LienzoLayerUtils.getUUID_At(lienzoLayer, x, y); if (null != viewUUID && viewUUID.trim().length() > 0) { final Shape<?> shape = canvas.getShape(viewUUID); if (null != shape) { return canvasHandler.getGraphIndex().getNode(shape.getUUID()); } } return null; }  BoundsIndexer<AbstractCanvasHandler, Node<View<?>, Edge>> build(final AbstractCanvasHandler context); @Override @SuppressWarnings("unchecked") Node<View<?>, Edge> getAt(final double x,
                                     final double y); @Override @SuppressWarnings("unchecked") Node<View<?>, Edge> getAt(final double x,
                                     final double y,
                                     final double width,
                                     final double height,
                                     final Element parentNode); @Override double[] getTrimmedBounds(); @Override void destroy();  }