Package org.jfree.chart.ui
Class Size2D
java.lang.Object
org.jfree.chart.ui.Size2D
- All Implemented Interfaces:
Serializable,Cloneable,PublicCloneable
A simple class for representing the dimensions of an object. It would be
better to use
Dimension2D, but this class is broken on various
JDK releases (particularly JDK 1.3.1, refer to bugs 4189446 and 4976448 on
the Java bug parade).- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a clone of this object.booleanCompares this instance for equality with an arbitrary object.doubleReturns the height.doublegetWidth()Returns the width.inthashCode()voidsetHeight(double height) Sets the height.voidsetWidth(double width) Sets the width.toString()Returns a string representation of this instance, mostly used for debugging purposes.
-
Field Details
-
width
The width. -
height
The height.
-
-
Constructor Details
-
Size2D
public Size2D()Creates a new instance with zero width and height. -
Size2D
Creates a new instance with the specified width and height.- Parameters:
width- the width.height- the height.
-
-
Method Details
-
getWidth
Returns the width.- Returns:
- The width.
-
setWidth
Sets the width.- Parameters:
width- the width.
-
getHeight
Returns the height.- Returns:
- The height.
-
setHeight
Sets the height.- Parameters:
height- the height.
-
toString
Returns a string representation of this instance, mostly used for debugging purposes. -
equals
Compares this instance for equality with an arbitrary object. -
hashCode
-
clone
Returns a clone of this object.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classObject- Returns:
- A clone.
- Throws:
CloneNotSupportedException- if the object cannot be cloned.
-