Package javafx.geometry
Class Dimension2D
java.lang.Object
javafx.geometry.Dimension2D
A 2D dimension object that contains a width and a height.
- Since:
- JavaFX 2.0
-
Constructor Summary
ConstructorDescriptionDimension2D
(double width, double height) Constructs aDimension2D
with the specified width and height. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.final double
The height of the dimension.final double
getWidth()
The width of the dimension.int
hashCode()
Returns a hash code value for the Dimension2D object.toString()
Returns a string representation of thisDimension2D
.
-
Constructor Details
-
Dimension2D
public Dimension2D(double width, double height) Constructs aDimension2D
with the specified width and height.- Parameters:
width
- the widthheight
- the height
-
-
Method Details
-
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
Indicates whether some other object is "equal to" this one. -
hashCode
public int hashCode()Returns a hash code value for the Dimension2D object. -
toString
Returns a string representation of thisDimension2D
. 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 benull
.
-