public void copyLayoutInformationFrom(View source) { 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); } } }
@Override public int compareTo(View view) { return getTitle().compareTo(view.getTitle()); }