Hello.
I’m trying to create a GroupShape and add text box type Shapes to it. The only way to create a new GroupShape seems to be via a constructor:
GroupShape groupShape = new GroupShape(documentBuilder.getDocument());
Shape shape = new Shape(documentBuilder.getDocument(), ShapeType.TEXT_BOX)
groupShape.appendChild(shape);
However, a group shape initialised this way does not have a parent node. So when I attempt to reposition the cursor using DocumentBuilder documentBuilder.moveTo(groupShape.getParentNode())
this fails due to parent node being null.
If I’m not mistaken, a shape typically has a parent node when it is created using DocumentBuilder like this:
Shape shape = documentBuilder.insertShape(ShapeType.TEXT_BOX, 0d, 0d);
Is it possible to create a GroupShape with DocumentBuilder? If not, how can GroupShape parent be assigned, and which node should act as its parent?