Exemplo n.º 1
0
 /**
  * {@inheritDoc}
  *
  * @since 1.2
  */
 public void setRoundRect(RoundRectangle2D rr) {
   this.x = rr.getX();
   this.y = rr.getY();
   this.width = rr.getWidth();
   this.height = rr.getHeight();
   this.arcwidth = rr.getArcWidth();
   this.archeight = rr.getArcHeight();
 }
Exemplo n.º 2
0
 /**
  * Determines whether or not the specified <code>Object</code> is equal to this <code>
  * RoundRectangle2D</code>. The specified <code>Object</code> is equal to this <code>
  * RoundRectangle2D</code> if it is an instance of <code>RoundRectangle2D</code> and if its
  * location, size, and corner arc dimensions are the same as this <code>RoundRectangle2D</code>.
  *
  * @param obj an <code>Object</code> to be compared with this <code>RoundRectangle2D</code>.
  * @return <code>true</code> if <code>obj</code> is an instance of <code>RoundRectangle2D</code>
  *     and has the same values; <code>false</code> otherwise.
  * @since 1.6
  */
 public boolean equals(Object obj) {
   if (obj == this) {
     return true;
   }
   if (obj instanceof RoundRectangle2D) {
     RoundRectangle2D rr2d = (RoundRectangle2D) obj;
     return ((getX() == rr2d.getX())
         && (getY() == rr2d.getY())
         && (getWidth() == rr2d.getWidth())
         && (getHeight() == rr2d.getHeight())
         && (getArcWidth() == rr2d.getArcWidth())
         && (getArcHeight() == rr2d.getArcHeight()));
   }
   return false;
 }
Exemplo n.º 3
0
 /**
  * Sets this <code>RoundRectangle2D</code> to be the same as the specified <code>RoundRectangle2D
  * </code>.
  *
  * @param rr the specified <code>RoundRectangle2D</code>
  * @since 1.2
  */
 public void setRoundRect(RoundRectangle2D rr) {
   setRoundRect(
       rr.getX(), rr.getY(), rr.getWidth(), rr.getHeight(), rr.getArcWidth(), rr.getArcHeight());
 }