理解javafx中控件的边界

javafx中控件的边界(Boundary)有3种:

第一种是控件本身的Boundary,可通过getLayoutBounds获取。

第二种是控件本身(不计算transforms)和特效的Boundary,可通过getBoundsInLocal,获取。

第三种是控件本身(计算transforms)和特效的Boundary,可通过getBoundsInParent获取。

控件没有Translate时,3种边界效果图如下(方框表示Boundary):

1.jpg

2.jpg

3.jpg

getLayoutBounds

getBoundsInLocal

getBoundsInParent

控件有Translate时,3种边界效果图如下:

4.jpg

5.jpg

6.jpg

getLayoutBounds

getBoundsInLocal

getBoundsInParent

源码下载地址...

更多源码下载...

posted on 2012-11-08 20:57  韩细  阅读(1244)  评论(0编辑  收藏  举报