Package shapes

Examples of shapes.Rectangle2DExt


    g.setColor(prev);
  }

  public Rectangle2DExt getBounds() {
    return new Rectangle2DExt((Rectangle2D.Double)shape.getBounds2D());
  }
View Full Code Here


    super();

    name = "School " + String.valueOf(increment++);

    // Create the school's shape
    shape = new Rectangle2DExt();
    shape.setFrameFromCenter(location.x, location.y, location.x + 15, location.y + 15);

    this.location = new Point2DExt(location);

    // Create the handle
View Full Code Here

    super(source);

    closestEdge = source.closestEdge;

    location = new Point2DExt(source.location);
    shape = new Rectangle2DExt(source.shape);

    schoolType = source.schoolType;
    capacity = source.capacity;
    timeClosing = source.timeClosing;
    timeOpening = source.timeOpening;
View Full Code Here

    shape = new AreaExt(source.shape);
  }

  public Rectangle2DExt getBounds() {
    return new Rectangle2DExt((Rectangle2D.Double)shape.getBounds2D());
  }
View Full Code Here

    this.edge = edge;

    this.location = new Point2DExt(location);
   
    shape = new Rectangle2DExt(location.x-10,location.y-10,20,20);

    //Find the point on the edge where the accident happens relative to the edge starting point
    Point2D edgeStartingPoint = edge.getLanes().get(0).GetPoint(0);
     
    double relativeLocation = Math.min(edgeStartingPoint.distance(this.location),edge.getLength());
View Full Code Here

    return tooltip;
  }

  public Rectangle2DExt getBounds() {
    return new Rectangle2DExt((Rectangle2D.Double) shape.getBounds2D());
  }
View Full Code Here

   * Returns the element's bounds
   *
   * @return
   */
  public Rectangle2DExt getBounds() {
    return new Rectangle2DExt(shape.getBounds2D());
  }
View Full Code Here

  }

  public Rectangle2DExt getBounds() {
    Rectangle2D bounds = area.getBounds2D();
   
    return new Rectangle2DExt(bounds.getCenterX(),bounds.getCenterY(),bounds.getWidth(),bounds.getHeight());
  }
View Full Code Here

  public Rectangle2DExt getBounds() {
    Rectangle2D bounds = startArea.getBounds2D();
   
    bounds.add(endArea.getBounds2D());
   
    return new Rectangle2DExt(bounds.getCenterX(),bounds.getCenterY(),bounds.getWidth(),bounds.getHeight());
  }
View Full Code Here

TOP

Related Classes of shapes.Rectangle2DExt

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.