I’ve got a JGoDocument that I’m adding JGoObjects to and that works fine. However, when I delete JGoObjects, I’d like to “pack” or re-size the document so that any excess “empty space” is removed.
Is there a simple method (like pack()) to do this? I know they have specific locations and I don’t want to change them, I just want the document size to shrink.
I’ve gone down the path of using computeBounds() but that doesn’t get rid of the empty space on the left and my JGoOverview gets a bit out of sync:
Rectangle jgoDocumentBounds = jgoDocument.computeBounds();
jgoDocument.setDocumentSize(new Dimension(jgoDocumentBounds.width, jgoDocumentBounds.height));
Am I going down the wrong path? Is there a better way of doing this?