Class Box

All Implemented Interfaces:
Styleable, EventTarget

public non-sealed class Box extends Shape3D
The Box class defines a 3 dimensional box with the specified size. A Box is a 3D geometry primitive created with a given depth, width, and height. It is centered at the origin.
Since:
JavaFX 8.0
  • Property Details Link icon

  • Field Details Link icon

    • DEFAULT_SIZE Link icon

      @Deprecated(since="18", forRemoval=true) public static final double DEFAULT_SIZE
      Deprecated, for removal: This API element is subject to removal in a future version.
      This field was exposed mistakenly and will be removed.
      Default size of the Box.
      See Also:
  • Constructor Details Link icon

    • Box Link icon

      public Box()
      Creates a new instance of Box of dimension 2 by 2 by 2.
    • Box Link icon

      public Box(double width, double height, double depth)
      Creates a new instance of Box of dimension width by height by depth.
      Parameters:
      width - the width of this box
      height - the height of this box
      depth - the depth of this box
  • Method Details Link icon

    • setDepth Link icon

      public final void setDepth(double value)
      Sets the value of the depth property.
      Property description:
      Defines the depth or the Z dimension of the Box.
      Default value:
      2.0
      Parameters:
      value - the value for the depth property
      See Also:
    • getDepth Link icon

      public final double getDepth()
      Gets the value of the depth property.
      Property description:
      Defines the depth or the Z dimension of the Box.
      Default value:
      2.0
      Returns:
      the value of the depth property
      See Also:
    • depthProperty Link icon

      public final DoubleProperty depthProperty()
      Defines the depth or the Z dimension of the Box.
      Default value:
      2.0
      Returns:
      the depth property
      See Also:
    • setHeight Link icon

      public final void setHeight(double value)
      Sets the value of the height property.
      Property description:
      Defines the height or the Y dimension of the Box.
      Default value:
      2.0
      Parameters:
      value - the value for the height property
      See Also:
    • getHeight Link icon

      public final double getHeight()
      Gets the value of the height property.
      Property description:
      Defines the height or the Y dimension of the Box.
      Default value:
      2.0
      Returns:
      the value of the height property
      See Also:
    • heightProperty Link icon

      public final DoubleProperty heightProperty()
      Defines the height or the Y dimension of the Box.
      Default value:
      2.0
      Returns:
      the height property
      See Also:
    • setWidth Link icon

      public final void setWidth(double value)
      Sets the value of the width property.
      Property description:
      Defines the width or the X dimension of the Box.
      Default value:
      2.0
      Parameters:
      value - the value for the width property
      See Also:
    • getWidth Link icon

      public final double getWidth()
      Gets the value of the width property.
      Property description:
      Defines the width or the X dimension of the Box.
      Default value:
      2.0
      Returns:
      the value of the width property
      See Also:
    • widthProperty Link icon

      public final DoubleProperty widthProperty()
      Defines the width or the X dimension of the Box.
      Default value:
      2.0
      Returns:
      the width property
      See Also: