Resize with AspectRatio

I was wondering if anybody has implemented a resize where the aspect ratio of the original shape is preserved.

handleResizing in a new JGoView Subclass is the key I think

regards,
Dennis

Actually, you probably want to override JGoObject.handleResize.
The code in SimpleNode.java, rescaleChildren, maintains the aspect ratio of the image when the whole node is resized. That’s not exactly what you probably want, but it’s similar.

Thx, i did that already, but can you commit the rubberband(when resizing) to the same aspect ratio as well?
Dennis

I believe you can–you need to customize the Rectangle returned by your override of JGoObject.handleResize.

THX, I will do that