@Test public void testGetIndex() throws Exception { final CaseManagementShapeView child1 = createShapeView("child1"); final CaseManagementShapeView child2 = createShapeView("child2"); shape.add(child1); shape.add(child2); assertEquals(shape.getIndex(child1), 0); assertEquals(shape.getIndex(child2), 1); }
public int getIndex(final WiresShape shape) { final NFastArrayList<WiresShape> children = getChildShapes(); for (int i = 0, n = children.size(); i < n; i++) { final WiresShape child = children.get(i); if (child == shape || isUUIDSame(shape, child)) { return i; } } return -1; }
CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public int getIndex(final WiresShape shape) { final NFastArrayList<WiresShape> children = getChildShapes(); for (int i = 0, n = children.size(); i < n; i++) { final WiresShape child = children.get(i); if (child == shape || isUUIDSame(shape, child)) { return i; } } return -1; } }
CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public int getIndex(final WiresShape shape) { final NFastArrayList<WiresShape> children = getChildShapes(); for (int i = 0, n = children.size(); i < n; i++) { final WiresShape child = children.get(i); if (child == shape || isUUIDSame(shape, child)) { return i; } } return -1; } CaseManagementShapeView(final String name,
                                   final SVGPrimitiveShape svgPrimitive,
                                   final double width,
                                   final double height,
                                   final boolean resizable);  CaseManagementShapeView(final String name,
                                   final SVGPrimitiveShape svgPrimitive,
                                   final double width,
                                   final double height,
                                   final boolean resizable,
                                   final Optional<MultiPath> optDropZone); }
CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public int getIndex(final WiresShape shape) { final NFastArrayList<WiresShape> children = getChildShapes(); for (int i = 0, n = children.size(); i < n; i++) { final WiresShape child = children.get(i); if (child == shape || isUUIDSame(shape, child)) { return i; } } return -1; } CaseManagementShapeView(final String name,
                                   final SVGPrimitiveShape svgPrimitive,
                                   final double width,
                                   final double height,
                                   final boolean resizable);  CaseManagementShapeView(final String name,
                                   final SVGPrimitiveShape svgPrimitive,
                                   final double width,
                                   final double height,
                                   final boolean resizable,
                                   final Optional<MultiPath> optDropZone); void setLabel(String shapeLabel); double getWidth(); double getHeight(); void logicallyReplace(final CaseManagementShapeView original, final CaseManagementShapeView replacement); void addShape(final WiresShape shape, final int targetIndex); int getIndex(final WiresShape shape); Optional<MultiPath> getDropZone(); CaseManagementShapeView getGhost(); void setCanvas(CaseManagementCanvas canvas); }
CaseManagementShapeView extends SVGShapeViewImpl implements HasSize<SVGShapeViewImpl> { public int getIndex(final WiresShape shape) { final NFastArrayList<WiresShape> children = getChildShapes(); for (int i = 0, n = children.size(); i < n; i++) { final WiresShape child = children.get(i); if (child == shape || isUUIDSame(shape, child)) { return i; } } return -1; } CaseManagementShapeView(final String name,
                                   final SVGPrimitiveShape svgPrimitive,
                                   final double width,
                                   final double height,
                                   final boolean resizable);  CaseManagementShapeView(final String name,
                                   final SVGPrimitiveShape svgPrimitive,
                                   final double width,
                                   final double height,
                                   final boolean resizable,
                                   final Optional<MultiPath> optDropZone); void setLabel(String shapeLabel); double getWidth(); double getHeight(); void logicallyReplace(final CaseManagementShapeView original, final CaseManagementShapeView replacement); void addShape(final WiresShape shape, final int targetIndex); int getIndex(final WiresShape shape); Optional<MultiPath> getDropZone(); CaseManagementShapeView getGhost(); void setCanvas(CaseManagementCanvas canvas);  }