Package breadboards

Class 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 width
      GDimension​(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 GDimension
      double getWidth()
      returns the width of this GDimension
      void setSize​(double width, double height)
      sets the dimensions of this GDimension to the specified width and height
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 width
        height - 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 width
        height - the specified height