Spec-Zone.ru › OpenJavaFX 8
javafx.geometry

Class Bounds

java.lang.Object
  • javafx.geometry.Bounds

Direct Known Subclasses:

BoundingBox



public abstract class Bounds
extends Object
The base class for objects that are used to describe the bounds of a node or other scene graph object. One interesting characteristic of a Bounds object is that it may have a negative width, height, or depth. A negative value for any of these indicates that the Bounds are "empty".

Since:

JavaFX 2.0

  • Constructor Summary

    Constructors
    Modifier Constructor and Description
    protected Bounds(double minX, double minY, double minZ, double width, double height, double depth)
    Creates a new instance of Bounds class.
  • Method Summary

    All MethodsInstance MethodsAbstract MethodsConcrete Methods
    Modifier and Type Method and Description
    abstract boolean contains(Bounds b)
    Tests if the interior of this Bounds entirely contains the specified Bounds, b.
    abstract boolean contains(double x, double y)
    Tests if the specified (x, y) coordinates are inside the boundary of Bounds.
    abstract boolean contains(double x, double y, double z)
    Tests if the specified (x, y, z) coordinates are inside the boundary of Bounds.
    abstract boolean contains(double x, double y, double w, double h)
    Tests if the interior of this Bounds entirely contains the specified rectangular area.
    abstract boolean contains(double x, double y, double z, double w, double h, double d)
    Tests if the interior of this Bounds entirely contains the specified rectangular area.
    abstract boolean contains(Point2D p)
    Tests if the specified point is inside the boundary of Bounds.
    abstract boolean contains(Point3D p)
    Tests if the specified point is inside the boundary of Bounds.
    double getDepth()
    The depth of this Bounds.
    double getHeight()
    The height of this Bounds.
    double getMaxX()
    The x coordinate of the lower-right corner of this Bounds.
    double getMaxY()
    The y coordinate of the lower-right corner of this Bounds.
    double getMaxZ()
    The maximum z coordinate of this Bounds.
    double getMinX()
    The x coordinate of the upper-left corner of this Bounds.
    double getMinY()
    The y coordinate of the upper-left corner of this Bounds.
    double getMinZ()
    The minimum z coordinate of this Bounds.
    double getWidth()
    The width of this Bounds.
    abstract boolean intersects(Bounds b)
    Tests if the interior of this Bounds intersects the interior of a specified Bounds, b.
    abstract boolean intersects(double x, double y, double w, double h)
    Tests if the interior of this Bounds intersects the interior of a specified rectangular area.
    abstract boolean intersects(double x, double y, double z, double w, double h, double d)
    Tests if the interior of this Bounds intersects the interior of a specified rectangular area.
    abstract boolean isEmpty()
    Indicates whether any of the dimensions(width, height or depth) of this bounds is less than zero.
    • Methods inherited from class java.lang.Object

      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Detail

    • Bounds

      protected Bounds(double minX,
                       double minY,
                       double minZ,
                       double width,
                       double height,
                       double depth)
      Creates a new instance of Bounds class.

      Parameters:

      minX - the X coordinate of the upper-left corner

  • Method Detail

    • getMinX

      public final double getMinX()
      The x coordinate of the upper-left corner of this Bounds.

      Default value:

      0.0

    • getMinY

      public final double getMinY()
      The y coordinate of the upper-left corner of this Bounds.

      Default value:

      0.0

    • getMinZ

      public final double getMinZ()
      The minimum z coordinate of this Bounds.

      Default value:

      0.0

    • getWidth

      public final double getWidth()
      The width of this Bounds.

      Default value:

      0.0

    • getHeight

      public final double getHeight()
      The height of this Bounds.

      Default value:

      0.0

    • getDepth

      public final double getDepth()
      The depth of this Bounds.

      Default value:

      0.0

    • getMaxX

      public final double getMaxX()
      The x coordinate of the lower-right corner of this Bounds.

      Default value:

      minX + width

    • getMaxY

      public final double getMaxY()
      The y coordinate of the lower-right corner of this Bounds.

      Default value:

      minY + height

    • getMaxZ

      public final double getMaxZ()
      The maximum z coordinate of this Bounds.

      Default value:

      minZ + depth

    • isEmpty

      public abstract boolean isEmpty()
      Indicates whether any of the dimensions(width, height or depth) of this bounds is less than zero.

      Returns:

      true if any of the dimensions(width, height or depth) of this bounds is less than zero.

    • contains

      public abstract boolean contains(Point2D p)
      Tests if the specified point is inside the boundary of Bounds.

      Parameters:

      p - the specified point to be tested

      Returns:

      true if the specified point is inside the boundary of this Bounds; false otherwise.

    • contains

      public abstract boolean contains(Point3D p)
      Tests if the specified point is inside the boundary of Bounds.

      Parameters:

      p - the specified 3D point to be tested

      Returns:

      true if the specified point is inside the boundary of this Bounds; false otherwise.

    • contains

      public abstract boolean contains(double x,
                                       double y)
      Tests if the specified (x, y) coordinates are inside the boundary of Bounds.

      Parameters:

      x - the specified x coordinate to be tested

      Returns:

      true if the specified (x, y) coordinates are inside the boundary of this Bounds; false otherwise.

    • contains

      public abstract boolean contains(double x,
                                       double y,
                                       double z)
      Tests if the specified (x, y, z) coordinates are inside the boundary of Bounds.

      Parameters:

      x - the specified x coordinate to be tested

      Returns:

      true if the specified (x, y) coordinates are inside the boundary of this Bounds; false otherwise.

    • contains

      public abstract boolean contains(Bounds b)
      Tests if the interior of this Bounds entirely contains the specified Bounds, b.

      Parameters:

      b - The specified Bounds

      Returns:

      true if the specified Bounds, b, is inside the boundary of this Bounds; false otherwise.

    • contains

      public abstract boolean contains(double x,
                                       double y,
                                       double w,
                                       double h)
      Tests if the interior of this Bounds entirely contains the specified rectangular area.

      Parameters:

      x - the x coordinate of the upper-left corner of the specified rectangular area

      Returns:

      true if the interior of this Bounds entirely contains the specified rectangular area; false otherwise.

    • contains

      public abstract boolean contains(double x,
                                       double y,
                                       double z,
                                       double w,
                                       double h,
                                       double d)
      Tests if the interior of this Bounds entirely contains the specified rectangular area.

      Parameters:

      x - the x coordinate of the upper-left corner of the specified rectangular volume

      Returns:

      true if the interior of this Bounds entirely contains the specified rectangular area; false otherwise.

    • intersects

      public abstract boolean intersects(Bounds b)
      Tests if the interior of this Bounds intersects the interior of a specified Bounds, b.

      Parameters:

      b - The specified Bounds

      Returns:

      true if the interior of this Bounds and the interior of the specified Bounds, b, intersect.

    • intersects

      public abstract boolean intersects(double x,
                                         double y,
                                         double w,
                                         double h)
      Tests if the interior of this Bounds intersects the interior of a specified rectangular area.

      Parameters:

      x - the x coordinate of the upper-left corner of the specified rectangular area

      Returns:

      true if the interior of this Bounds and the interior of the rectangular area intersect.

    • intersects

      public abstract boolean intersects(double x,
                                         double y,
                                         double z,
                                         double w,
                                         double h,
                                         double d)
      Tests if the interior of this Bounds intersects the interior of a specified rectangular area.

      Parameters:

      x - the x coordinate of the upper-left corner of the specified rectangular volume

      Returns:

      true if the interior of this Bounds and the interior of the rectangular area intersect.

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API