Esempio n. 1
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 18JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * Checks whether two GeoSize objects have equal values.
         * @param obj the object to compare
         * @return ture if they have same size.
         */
        public new bool Equals(object obj)
        {
            if (obj is GeoSize)
            {
                GeoSize d = (GeoSize)obj;
                return((Width == d.Width) && (Height == d.Height));
            }
            return(false);
        }
Esempio n. 2
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 18JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * Creates an instance of <code>GeoSize</code> whose Width
         * and Height are the same as for the specified GeoSize.
         *
         * @param    size   the specified GeoSize for the
         *               <code>Width</code> and
         *               <code>Height</code> values
         */
        public GeoSize(GeoSize size)
            : this(size.Width, size.Height)
        {
        }
Esempio n. 3
0
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 18JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * Sets the size of this <code>GeoSize</code> object to
         * match the specified size.
         * This method is included for completeness, to parallel the
         * <code>getSize</code> method of <code>Component</code>.
         * @param d  the new size for the <code>GeoSize</code>
         * object
         */
        public void SetSize(GeoSize d)
        {
            SetSize(d.GetWidth(), d.GetHeight());
        }
Esempio n. 4
0
 ////////////////////////////////////////////////////////////////////////////
 //--------------------------------- REVISIONS ------------------------------
 // Date       Name                 Tracking #         Description
 // ---------  -------------------  -------------      ----------------------
 // 18JUN2009  James Shen                 	          Initial Creation
 ////////////////////////////////////////////////////////////////////////////
 /**
  * Creates an instance of <code>GeoSize</code> whose Width
  * and Height are the same as for the specified GeoSize.
  *
  * @param    size   the specified GeoSize for the
  *               <code>Width</code> and
  *               <code>Height</code> values
  */
 public GeoSize(GeoSize size)
     : this(size.Width, size.Height)
 {
 }
Esempio n. 5
0
 //--------------------------------- REVISIONS ------------------------------
 // Date       Name                 Tracking #         Description
 // ---------  -------------------  -------------      ----------------------
 // 18JUN2009  James Shen                 	          Initial Creation
 ////////////////////////////////////////////////////////////////////////////
 /**
  * Sets the size of this <code>GeoSize</code> object to
  * match the specified size.
  * This method is included for completeness, to parallel the
  * <code>getSize</code> method of <code>Component</code>.
  * @param d  the new size for the <code>GeoSize</code>
  * object
  */
 public void SetSize(GeoSize d)
 {
     SetSize(d.GetWidth(), d.GetHeight());
 }
Esempio n. 6
0
 ////////////////////////////////////////////////////////////////////////////
 //--------------------------------- REVISIONS ------------------------------
 // Date       Name                 Tracking #         Description
 // ---------  -------------------  -------------      ----------------------
 // 18JUN2009  James Shen                 	          Initial Creation
 ////////////////////////////////////////////////////////////////////////////
 /**
  * Constructs a new <code>GeoBounds</code> whose top left corner is
  * (0,&nbsp;0) and whose Width and Height are specified
  * by the <code>GeoSize</code> argument.
  * @param size a <code>GeoSize</code>, specifying Width and Height
  */
 public GeoBounds(GeoSize size)
     : this(0, 0, size.Width, size.Height)
 {
 }
Esempio n. 7
0
 ////////////////////////////////////////////////////////////////////////////
 //--------------------------------- REVISIONS ------------------------------
 // Date       Name                 Tracking #         Description
 // ---------  -------------------  -------------      ----------------------
 // 03JAN2009  James Shen                 	          Initial Creation
 ////////////////////////////////////////////////////////////////////////////
 /**
  * Constructs a new <code>GeoBounds</code> whose upper-left corner is
  * specified by the {@link GeoPoint} argument, and
  * whose Width and Height are specified by the
  * {@link GeoSize} argument.
  * @param p a <code>GeoPoint</code> that is the upper-left corner of
  * the <code>GeoBounds</code>
  * @param size a <code>GeoSize</code>, representing the
  * Width and Height of the <code>GeoBounds</code>
  */
 public GeoBounds(GeoPoint p, GeoSize size)
     : this(p.X, p.Y, size.Width, size.Height)
 {
 }
Esempio n. 8
0
 ////////////////////////////////////////////////////////////////////////////
 //--------------------------------- REVISIONS ------------------------------
 // Date       Name                 Tracking #         Description
 // ---------  -------------------  -------------      ----------------------
 // 18JUN2009  James Shen                 	          Initial Creation
 ////////////////////////////////////////////////////////////////////////////
 /**
  * Sets the location and size of the framing rectangle of this
  * <code>IShape</code> to the specified {@link GeoPoint} and
  * {@link GeoSize}, respectively.  The framing rectangle is used
  * by the subclasses of <code>RectangularShape</code> to define
  * their geometry.
  * @param loc the specified <code>GeoPoint</code>
  * @param size the specified <code>GeoSize</code>
  */
 public void SetFrame(GeoPoint loc, GeoSize size)
 {
     SetFrame(loc.GetX(), loc.GetY(), size.GetWidth(), size.GetHeight());
 }