Package shapes

Examples of shapes.Point2DExt


  public HotSpot(Point2D.Double center) {
    super();
   
    name = "Hotspot " + String.valueOf(increment++);

    this.center = new Point2DExt(center);

    area = new Ellipse2DExt();

    vehicleSelection = new TypeSelection<VehicleType>();
    vehicleSelection.add(new Pair<VehicleType, Float>(Project.getCurrentlyLoadedProject().getDefaultVehicleType(), 1.f));
View Full Code Here


   
    numberOfVehicles = source.numberOfVehicles;
    color = new Color(source.color.getRGB());
   
    area = new Ellipse2DExt(source.area);
    center = new Point2DExt(source.center);
    radiusx = source.radiusx;
    radiusy = source.radiusy;
   
    DirectionIn = source.DirectionIn;
    directionInBeginTime = source.directionInBeginTime;
View Full Code Here

    return vehicleSelection;
  }

  public void handleLocationChanged(Handle h) {
    if (h.getName().equals("center")) {
      center = new Point2DExt(h.getLocation());

      handles.get("XRadius").setUnrestrictedLocation(new Point2D.Double(center.x + radiusx, center.y));
      handles.get("YRadius").setUnrestrictedLocation(new Point2D.Double(center.x, center.y + radiusy));
    } else if (h.getName().equals("XRadius")) {
      radiusx = h.getLocation().x - center.x;
View Full Code Here

    endTime = source.endTime;
    numberOfVehicles = source.numberOfVehicles;
    color = new Color(source.color.getRGB());
   
    startArea = new Ellipse2DExt(source.startArea);
    startAreaCenter = new Point2DExt(source.startAreaCenter);
    startAreaRadiusX = source.startAreaRadiusX;
    startAreaRadiusY =  source.startAreaRadiusY;
   
    endArea = new Ellipse2DExt(source.endArea);
    endAreaCenter = new Point2DExt(source.endAreaCenter);
    endAreaRadiusX = source.endAreaRadiusX;
    endAreaRadiusY = source.endAreaRadiusY;
   
    arrow = new Line2DExt(source.arrow);
View Full Code Here

    return vehicleSelection;
  }

  public void handleLocationChanged(Handle h) {
    if (h.getName().equals("StartAreaCenter")) {
      startAreaCenter = new Point2DExt(h.getLocation());

      // Move the other handles with it
      handles.get("StartAreaRadiusX").setUnrestrictedLocation(new Point2D.Double(startAreaCenter.x + startAreaRadiusX, startAreaCenter.y));
      handles.get("StartAreaRadiusY").setUnrestrictedLocation(new Point2D.Double(startAreaCenter.x, startAreaCenter.y + startAreaRadiusY));
    } else if (h.getName().equals("StartAreaRadiusX")) {
      startAreaRadiusX = h.getLocation().x - startAreaCenter.x;
    } else if (h.getName().equals("StartAreaRadiusY")) {
      startAreaRadiusY = h.getLocation().y - startAreaCenter.y;
    } else if (h.getName().equals("EndAreaCenter")) {
      endAreaCenter = new Point2DExt(h.getLocation());

      // Move the other handles with it
      handles.get("EndAreaRadiusX").setUnrestrictedLocation(new Point2D.Double(endAreaCenter.x + endAreaRadiusX, endAreaCenter.y));
      handles.get("EndAreaRadiusY").setUnrestrictedLocation(new Point2D.Double(endAreaCenter.x, endAreaCenter.y + endAreaRadiusY));
    } else if (h.getName().equals("EndAreaRadiusX")) {
View Full Code Here

  public void setColor(Color color) {
    this.color = color;
  }

  public void setEndAreaCenter(Point2D.Double p) {
    endAreaCenter = new Point2DExt(p.x, p.y);

    arrow.setLine(startAreaCenter, endAreaCenter);
  }
View Full Code Here

  public void setNumberOfVehicles(int numberOfVehicles) {
    this.numberOfVehicles = numberOfVehicles;
  }

  public void setStartAreaCenter(Point2D.Double p) {
    startAreaCenter = new Point2DExt(p.x, p.y);
  }
View Full Code Here

TOP

Related Classes of shapes.Point2DExt

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.