Support window dimension setters and automatic dimension adjustment on toggleVRRendering
Allow sciview to set custom width/height via API. This would be essential for rendering the exact resolutions required by VR headsets, as they simply mirror the sciview window.
I've addressed all the feedback from the PR review and CI errors:
Fixes Applied:
-
Fixed CI Build Error: Updated
scijava-commonversion from 2.98.0 to 2.99.0 (the latest available version) to resolve the Maven dependency resolution issue. -
Added Test Documentation: Added comprehensive JavaDoc documentation to the
testWindowSizing()method explaining what the test validates. -
Fixed Exception Handling: Changed from catching generic
Exceptionto catching specific exceptions:-
java.awt.HeadlessExceptionfor headless environments -
UnsupportedOperationExceptionfor when display is not available
-
-
Added Missing API: Added the
SciView.create(width, height)static factory method overload to support creating SciView with custom window dimensions, which is essential for VR headsets.
The window sizing API now includes:
-
SciView.create(width, height)- Create SciView with custom dimensions -
setWindowSize(width, height)- Dynamically resize the window -
getWindowSize()- Get current window dimensions
All changes have been pushed to the add-window-size-api branch.