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

  • Field Details

    • DEFAULT_SIZE

      @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

    • Box

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

      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

    • setDepth

      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

      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

      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

      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

      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

      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

      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

      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

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