Community
Participate
Working Groups
The computation of content-bounds within InfiniteCanvas can be overwritten by subclasses, however, an adjustment is not correctly transferred to the computation of scrollable-bounds, which reuses the content-bounds, but additionally takes into account the bounds-in-parent of the content-group. Therefore, the computation of scrollable-bounds does also need to be overwritten when overwriting the computation of content-bounds, at least in most cases. In order to enhance the extensibility of InfiniteCanvas, the computeContentBoundsInLocal() method should be split into a computeContentBoundsInScrolledPane() method and a computeContentBoundsInLocal() method that reuses the content-bounds-in-scrolled. The computation of scrollable-bounds can then reuse both, the content-bounds-in-scrolled, as well as the content-bounds-in-local. Then, an adjustment to the content-bounds can be made by overwriting computeContentBoundsInScrolledPane(), and it will automatically be respected by the scrollable-bounds (once recomputed).