Class Box

All Implemented Interfaces:
Styleable, EventTarget

public 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

  • 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 property depth.
      Property description:
      Defines the depth or the Z dimension of the Box.
      Default value:
      2.0
    • getDepth

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

      public final DoubleProperty depthProperty()
      Defines the depth or the Z dimension of the Box.
      Default value:
      2.0
      See Also:
      getDepth(), setDepth(double)
    • setHeight

      public final void setHeight​(double value)
      Sets the value of the property height.
      Property description:
      Defines the height or the Y dimension of the Box.
      Default value:
      2.0
    • getHeight

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

      public final DoubleProperty heightProperty()
      Defines the height or the Y dimension of the Box.
      Default value:
      2.0
      See Also:
      getHeight(), setHeight(double)
    • setWidth

      public final void setWidth​(double value)
      Sets the value of the property width.
      Property description:
      Defines the width or the X dimension of the Box.
      Default value:
      2.0
    • getWidth

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

      public final DoubleProperty widthProperty()
      Defines the width or the X dimension of the Box.
      Default value:
      2.0
      See Also:
      getWidth(), setWidth(double)