javaFX节点的旋转问题

我想把一个pane绕着自身中心旋转,但是一旦调整窗口大小,该pane的旋转中心是scene
的中心。我的setrotate函数只有double angle这个参数,不能设置旋转基准点的x,y。是
e(fx)clipse的问题吗?**怎么解决这个绕自身中心旋转的问题呢?**

http://www.docin.com/p-689981478.html

可以使用getTransforms()函数。具体使用方法如下:

Rectangle rect2 = new Rectangle(100, 50, Color.LIGHTGRAY);
rect2.setStroke(Color.BLACK);
rect2.setOpacity(0.5);
// Apply a rotation on rect2. The rotation angle is 30 degree clockwise
// (0, 0) is the pivot point
Rotate rotate = new Rotate(30, 0, 0);
rect2.getTransforms().addAll(rotate);