javafx : Scroll Pane bounds and its visible content bounds are not matching even when the scroll Vvalue = 0 -


i printing bounds of scroll pane , visible contents using following code:

    bounds scrollbounds = scrollpane.localtoscene(scrollpane.getboundsinparent());     system.out.println("scrollpane bounds: " + scrollbounds);          if (scrollpane.getcontent() instanceof parent)          {             node n = (node)scrollpane.getcontent();             bounds contentbounds = n.localtoscene(n.getboundsinparent());             system.out.println("content bounds: " + contentbounds);         } 

it gives followint output :

scrollpane bounds: boundingbox [minx:1.0, miny:30.0, minz:0.0, width:862.0, height:505.0, depth:0.0, maxx:863.0, maxy:535.0, maxz:0.0] content bounds: boundingbox [minx:2.0, miny:6.0, minz:0.0, width:989.0, height:1296.0, depth:0.0, maxx:991.0, maxy:1302.0, maxz:0.0] 

if observe miny of scroll pane , contents, start of scrollpane content 24 units ahead of start of scroll pane itself.(though scroll pane's vvalue = 0, meaning scroll bar @ top).

also miny of content varying size of window.(when window size minimum 0 , when maximized around 20)

how possible? or getting bounds in wrong way?


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -