@Test public void createLineNull() { Object[] line = AbstractConnectorView.createLine(lineFactory, null, 0d, 1d); MultiPathDecorator headDecorator = (MultiPathDecorator) line[1]; MultiPathDecorator tailDecorator = (MultiPathDecorator) line[2]; assertEquals(headDecorator.getPath().getBoundingBox(), emptyBoundingBox()); assertEquals(tailDecorator.getPath().getBoundingBox(), emptyBoundingBox()); }
static Object[] createLine(LineConnectorFactory lineFactory, ConnectorShapeDef.Direction direction, final double... points) { final MultiPath head = BOTH.equals(direction) ? getArrowMultiPath() : new MultiPath(); final MultiPath tail = BOTH.equals(direction) || ONE.equals(direction) ? getArrowMultiPath() : new MultiPath(); final AbstractDirectionalMultiPointShape<?> line = lineFactory.createLine(Point2DArray.fromArrayOfDouble(points)); line.setDraggable(true); line.setSelectionStrokeOffset(SELECTION_OFFSET); line.setHeadOffset(head.getBoundingBox().getHeight()); line.setTailOffset(tail.getBoundingBox().getHeight()); final MultiPathDecorator headDecorator = new MultiPathDecorator(head); final MultiPathDecorator tailDecorator = new MultiPathDecorator(tail); return new Object[]{line, headDecorator, tailDecorator}; }
AbstractConnectorView extends WiresConnectorViewExt<AbstractConnectorView> { static Object[] createLine(LineConnectorFactory lineFactory, ConnectorShapeDef.Direction direction, final double... points) { final MultiPath head = BOTH.equals(direction) ? getArrowMultiPath() : new MultiPath(); final MultiPath tail = BOTH.equals(direction) || ONE.equals(direction) ? getArrowMultiPath() : new MultiPath(); final AbstractDirectionalMultiPointShape<?> line = lineFactory.createLine(Point2DArray.fromArrayOfDouble(points)); line.setDraggable(true); line.setSelectionStrokeOffset(SELECTION_OFFSET); line.setHeadOffset(head.getBoundingBox().getHeight()); line.setTailOffset(tail.getBoundingBox().getHeight()); final MultiPathDecorator headDecorator = new MultiPathDecorator(head); final MultiPathDecorator tailDecorator = new MultiPathDecorator(tail); return new Object[]{line, headDecorator, tailDecorator}; } }
AbstractConnectorView extends WiresConnectorViewExt<AbstractConnectorView> { static Object[] createLine(LineConnectorFactory lineFactory, ConnectorShapeDef.Direction direction, final double... points) { final MultiPath head = BOTH.equals(direction) ? getArrowMultiPath() : new MultiPath(); final MultiPath tail = BOTH.equals(direction) || ONE.equals(direction) ? getArrowMultiPath() : new MultiPath(); final AbstractDirectionalMultiPointShape<?> line = lineFactory.createLine(Point2DArray.fromArrayOfDouble(points)); line.setDraggable(true); line.setSelectionStrokeOffset(SELECTION_OFFSET); line.setHeadOffset(head.getBoundingBox().getHeight()); line.setTailOffset(tail.getBoundingBox().getHeight()); final MultiPathDecorator headDecorator = new MultiPathDecorator(head); final MultiPathDecorator tailDecorator = new MultiPathDecorator(tail); return new Object[]{line, headDecorator, tailDecorator}; } AbstractConnectorView(LineConnectorFactory lineFactory, final ConnectorShapeDef.Direction direction,
                                 final double... points); private  AbstractConnectorView(final Object[] line); }
AbstractConnectorView extends WiresConnectorViewExt<AbstractConnectorView> { static Object[] createLine(LineConnectorFactory lineFactory, ConnectorShapeDef.Direction direction, final double... points) { final MultiPath head = BOTH.equals(direction) ? getArrowMultiPath() : new MultiPath(); final MultiPath tail = BOTH.equals(direction) || ONE.equals(direction) ? getArrowMultiPath() : new MultiPath(); final AbstractDirectionalMultiPointShape<?> line = lineFactory.createLine(Point2DArray.fromArrayOfDouble(points)); line.setDraggable(true); line.setSelectionStrokeOffset(SELECTION_OFFSET); line.setHeadOffset(head.getBoundingBox().getHeight()); line.setTailOffset(tail.getBoundingBox().getHeight()); final MultiPathDecorator headDecorator = new MultiPathDecorator(head); final MultiPathDecorator tailDecorator = new MultiPathDecorator(tail); return new Object[]{line, headDecorator, tailDecorator}; } AbstractConnectorView(LineConnectorFactory lineFactory, final ConnectorShapeDef.Direction direction,
                                 final double... points); private  AbstractConnectorView(final Object[] line);  }
AbstractConnectorView extends WiresConnectorViewExt<AbstractConnectorView> { static Object[] createLine(LineConnectorFactory lineFactory, ConnectorShapeDef.Direction direction, final double... points) { final MultiPath head = BOTH.equals(direction) ? getArrowMultiPath() : new MultiPath(); final MultiPath tail = BOTH.equals(direction) || ONE.equals(direction) ? getArrowMultiPath() : new MultiPath(); final AbstractDirectionalMultiPointShape<?> line = lineFactory.createLine(Point2DArray.fromArrayOfDouble(points)); line.setDraggable(true); line.setSelectionStrokeOffset(SELECTION_OFFSET); line.setHeadOffset(head.getBoundingBox().getHeight()); line.setTailOffset(tail.getBoundingBox().getHeight()); final MultiPathDecorator headDecorator = new MultiPathDecorator(head); final MultiPathDecorator tailDecorator = new MultiPathDecorator(tail); return new Object[]{line, headDecorator, tailDecorator}; } AbstractConnectorView(LineConnectorFactory lineFactory, final ConnectorShapeDef.Direction direction,
                                 final double... points); private  AbstractConnectorView(final Object[] line);   }