javafx.scene.Node



layoutBounds

public final ReadOnlyObjectProperty layoutBoundsProperty
The rectangular(矩形) bounds that should be used for layout calculations(计算) for this node. layoutBounds may differ from the visual bounds of the node and is computed differently depending on the node type.
If the node type is resizable (Region, Control, or WebView) then the layoutBounds will always be 0,0 width x height. If the node type is not resizable (Shape, Text, or Group), then the layoutBounds are computed based on the node's geometric(几何) properties and does not include the node's clip(修剪), effect, or transforms. See individual class documentation for details.


Note that the layoutX, layoutY, translateX, and translateY variables are not included in the layoutBounds. This is important because layout code must first determine the current size and location of the node (using layoutBounds) and then set layoutX and layoutY to adjust the translation of the node so that it will have the desired(所需) layout position.(使用layoutBounds来确定xy坐标,所以xy坐标等变量没有包括在layoutBounds中)

Because the computation of layoutBounds is often tied to a node's geometric variables, it is an error to bind any such variables to an expression that depends upon layoutBounds. For example, the x or y variables of a shape should never be bound to layoutBounds for the purpose of positioning the node.

The layoutBounds will never be null.

See Also:

getLayoutBounds()


javafx.geometry.Bounds

public abstract class Bounds
extends java.lang.Object
The base class for objects that are used to describe the bounds of a node or other scene graph object.

一个很基础的类,边界,就是节点的边界,窗口的边界


你可能感兴趣的:(javafx)