Package breadboards
Class GDimension
- java.lang.Object
-
- breadboards.GDimension
-
public class GDimension extends java.lang.Object
Class whose objects are dimensions of a GObject (i.e., its height and width)- Author:
- paul oser
-
-
Constructor Summary
Constructors Constructor Description GDimension()
constructs a new GDimension with zero height and zero widthGDimension(double width, double height)
constructs a new GDimension with the specified width and height
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getHeight()
returns the height of this GDimensiondouble
getWidth()
returns the width of this GDimensionvoid
setSize(double width, double height)
sets the dimensions of this GDimension to the specified width and height
-
-
-
Constructor Detail
-
GDimension
public GDimension()
constructs a new GDimension with zero height and zero width
-
GDimension
public GDimension(double width, double height)
constructs a new GDimension with the specified width and height- Parameters:
width
- the specified widthheight
- the specified height
-
-
Method Detail
-
getHeight
public double getHeight()
returns the height of this GDimension- Returns:
- the height of this GDimension
-
getWidth
public double getWidth()
returns the width of this GDimension- Returns:
- the width of this GDimension
-
setSize
public void setSize(double width, double height)
sets the dimensions of this GDimension to the specified width and height- Parameters:
width
- the specified widthheight
- the specified height
-
-