Skip to main content

VBox HELP!!!!

2 replies [Last post]
alfredexe
Offline
Joined: 2010-02-21
Points: 0

hi, i'm using javaFx for a visualization method, however i don't know how can i get the scene coordinate of a node that it's inside a Vbox,Hbox and tile layout, can anybody help me.

thanks in advance

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
michael_heinrichs
Offline
Joined: 2007-11-15
Points: 0

You can use one of the localToScene()-functions in Node to convert between local coordinates and scene coordinates. For example to get the bounds, use:
[code]
var node: Node = ...
def b = node.localToScene(node.boundsInLocal);
[/code]

alfredexe
Offline
Joined: 2010-02-21
Points: 0

hi, i used

for( node in yAxis.vbox.content)
java.lang.System.out.println("{node.localToScene(node.boundsInParent)}");

and i'm getting this results

BoundingBox [minX = 63.015625, minY=287.375, maxX=95.7, maxY=301.45, width=32.684372, height=14.075012]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.39062, maxX=95.7, maxY=301.45, width=32.684372, height=14.059387]
BoundingBox [minX = 63.015625, minY=287.39062, maxX=95.7, maxY=301.45, width=32.684372, height=14.059387]
BoundingBox [minX = 63.015625, minY=287.3125, maxX=95.7, maxY=301.45, width=32.684372, height=14.137512]
BoundingBox [minX = 63.015625, minY=287.39062, maxX=95.7, maxY=301.45, width=32.684372, height=14.059387]
BoundingBox [minX = 63.015625, minY=287.28125, maxX=95.7, maxY=301.45, width=32.684372, height=14.168762]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.375, maxX=95.7, maxY=301.45, width=32.684372, height=14.075012]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.375, maxX=95.7, maxY=301.45, width=32.684372, height=14.075012]
BoundingBox [minX = 63.015625, minY=287.375, maxX=95.7, maxY=301.45, width=32.684372, height=14.075012]
BoundingBox [minX = 63.015625, minY=287.3125, maxX=95.7, maxY=301.45, width=32.684372, height=14.137512]
BoundingBox [minX = 63.015625, minY=287.375, maxX=95.7, maxY=301.45, width=32.684372, height=14.075012]
BoundingBox [minX = 63.015625, minY=287.28125, maxX=95.7, maxY=301.45, width=32.684372, height=14.168762]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.28125, maxX=95.7, maxY=301.45, width=32.684372, height=14.168762]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]
BoundingBox [minX = 63.015625, minY=287.29688, maxX=95.7, maxY=301.45, width=32.684372, height=14.153137]

there are some nodes that have the same coordenate, how is it possible?