PaperSize size = view.getPaperSize(); int width; int height;
/** * Attempts to copy the visual layout information (e.g. x,y coordinates) of elements and relationships * from the specified source view into this view. * * @param source the source View */ void copyLayoutInformationFrom(@Nonnull View source) { if (this.getPaperSize() == null) { this.setPaperSize(source.getPaperSize()); } for (ElementView sourceElementView : source.getElements()) { ElementView destinationElementView = findElementView(sourceElementView); if (destinationElementView != null) { destinationElementView.copyLayoutInformationFrom(sourceElementView); } } for (RelationshipView sourceRelationshipView : source.getRelationships()) { RelationshipView destinationRelationshipView = findRelationshipView(sourceRelationshipView); if (destinationRelationshipView != null) { destinationRelationshipView.copyLayoutInformationFrom(sourceRelationshipView); } } }