Package org.jfree.ui
Class Size2D
- java.lang.Object
-
- org.jfree.ui.Size2D
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,PublicCloneable
public class Size2D extends java.lang.Object implements java.lang.Cloneable, PublicCloneable, java.io.Serializable
A simple class for representing the dimensions of an object. It would be better to useDimension2D, 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).- Author:
- David Gilbert
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Returns a clone of this object.booleanequals(java.lang.Object obj)Compares this instance for equality with an arbitrary object.doublegetHeight()Returns the height.doublegetWidth()Returns the width.voidsetHeight(double height)Sets the height.voidsetWidth(double width)Sets the width.java.lang.StringtoString()Returns a string representation of this instance, mostly used for debugging purposes.
-
-
-
Method Detail
-
getWidth
public double getWidth()
Returns the width.- Returns:
- The width.
-
setWidth
public void setWidth(double width)
Sets the width.- Parameters:
width- the width.
-
getHeight
public double getHeight()
Returns the height.- Returns:
- The height.
-
setHeight
public void setHeight(double height)
Sets the height.- Parameters:
height- the height.
-
toString
public java.lang.String toString()
Returns a string representation of this instance, mostly used for debugging purposes.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string.
-
equals
public boolean equals(java.lang.Object obj)
Compares this instance for equality with an arbitrary object.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Returns a clone of this object.- Specified by:
clonein interfacePublicCloneable- Overrides:
clonein classjava.lang.Object- Returns:
- A clone.
- Throws:
java.lang.CloneNotSupportedException- if the object cannot be cloned.
-
-