class AbstractConnectorView extends WiresConnectorViewExt<AbstractConnectorView> {

    static Object[] createLine(LineConnectorFactory lineFactory, ConnectorShapeDef.Direction direction,
                               final double... points) {

        // The head decorator must be not visible, as connectors are unidirectional.
        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};
    }

    public  AbstractConnectorView(LineConnectorFactory lineFactory, final ConnectorShapeDef.Direction direction,
                                 final double... points);
    private  AbstractConnectorView(final Object[] line);

}