Spec-Zone.ru › OpenJavaFX 8
javafx.geometry

Class Dimension2D

java.lang.Object
  • javafx.geometry.Dimension2D


public class Dimension2D
extends Object
A 2D dimension object that contains a width and a height.

Since:

JavaFX 2.0

  • Constructor Summary

    Constructors
    Constructor and Description
    Dimension2D(double width, double height)
    Constructs a Dimension2D with the specified width and height.
  • Method Summary

    All MethodsInstance MethodsConcrete Methods
    Modifier and Type Method and Description
    boolean equals(Object obj)
    Indicates whether some other object is "equal to" this one.
    double getHeight()
    The height of the dimension.
    double getWidth()
    The width of the dimension.
    int hashCode()
    Returns a hash code value for the Dimension2D object.
    String toString()
    Returns a string representation of this Dimension2D.
    • Methods inherited from class java.lang.Object

      clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Detail

    • Dimension2D

      public Dimension2D(double width,
                         double height)
      Constructs a Dimension2D with the specified width and height.

      Parameters:

      width - the width

  • Method Detail

    • getWidth

      public final double getWidth()
      The width of the dimension.

      Returns:

      the width of the dimension

    • getHeight

      public final double getHeight()
      The height of the dimension.

      Returns:

      the height of the dimension

    • equals

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one.

      Overrides:

      equals in class Object

      Parameters:

      obj - the reference object with which to compare

      Returns:

      true if this Dimension2D instance is the same as the obj argument; false otherwise

    • hashCode

      public int hashCode()
      Returns a hash code value for the Dimension2D object.

      Overrides:

      hashCode in class Object

      Returns:

      a hash code value for the Dimension2D object.

    • toString

      public String toString()
      Returns a string representation of this Dimension2D. This method is intended to be used only for informational purposes. The content and format of the returned string might vary between implementations. The returned string might be empty but cannot be null.

      Overrides:

      toString in class Object

© 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