public XDGFShape(XDGFShape parent, ShapeSheetType shapeSheet, XDGFBaseContents parentPage, XDGFDocument document) { super(shapeSheet, document); _parent = parent; _parentPage = parentPage; TextType text = shapeSheet.getText(); if (text != null) { _text = new XDGFText(text, this); } if (shapeSheet.isSetShapes()) { _shapes = new ArrayList<>(); for (ShapeSheetType shape : shapeSheet.getShapes().getShapeArray()) { _shapes.add(new XDGFShape(this, shape, parentPage, document)); } } readProperties(); }
@Override protected void onDocumentRead() { if (_pageContents.isSetShapes()) { for (ShapeSheetType shapeSheet: _pageContents.getShapes().getShapeArray()) { XDGFShape shape = new XDGFShape(shapeSheet, this, _document); _toplevelShapes.add(shape); addToShapeIndex(shape); } } if (_pageContents.isSetConnects()) { for (ConnectType connect: _pageContents.getConnects().getConnectArray()) { XDGFShape from = _shapes.get(connect.getFromSheet()); XDGFShape to = _shapes.get(connect.getToSheet()); if (from == null) throw new POIXMLException(this + "; Connect; Invalid from id: " + connect.getFromSheet()); if (to == null) throw new POIXMLException(this + "; Connect; Invalid to id: " + connect.getToSheet()); _connections.add(new XDGFConnection(connect, from, to)); } } }
public XDGFShape(XDGFShape parent, ShapeSheetType shapeSheet, XDGFBaseContents parentPage, XDGFDocument document) { super(shapeSheet, document); _parent = parent; _parentPage = parentPage; TextType text = shapeSheet.getText(); if (text != null) { _text = new XDGFText(text, this); } if (shapeSheet.isSetShapes()) { _shapes = new ArrayList<>(); for (ShapeSheetType shape : shapeSheet.getShapes().getShapeArray()) { _shapes.add(new XDGFShape(this, shape, parentPage, document)); } } readProperties(); }
@Override protected void onDocumentRead() { if (_pageContents.isSetShapes()) { for (ShapeSheetType shapeSheet: _pageContents.getShapes().getShapeArray()) { XDGFShape shape = new XDGFShape(shapeSheet, this, _document); _toplevelShapes.add(shape); addToShapeIndex(shape); } } if (_pageContents.isSetConnects()) { for (ConnectType connect: _pageContents.getConnects().getConnectArray()) { XDGFShape from = _shapes.get(connect.getFromSheet()); XDGFShape to = _shapes.get(connect.getToSheet()); if (from == null) throw new POIXMLException(this + "; Connect; Invalid from id: " + connect.getFromSheet()); if (to == null) throw new POIXMLException(this + "; Connect; Invalid to id: " + connect.getToSheet()); _connections.add(new XDGFConnection(connect, from, to)); } } }