Package de.hpi.eworld.model.db.data

Examples of de.hpi.eworld.model.db.data.AreaModel


        affectionPoint.getX() - getRadius(), affectionPoint.getY() - getRadius(), getWidth(), getHeight());
  }

  @Override
  public ModelElement getAdjustedAssociatedElement(Point2D scrolledPoint, GraphController controller) {
    AreaModel event = (AreaModel) getModelElement().clone();
    CircleLocationModel circle = new CircleLocationModel();

    // setting circlePoint - scrolledPoint is the center
    final Point2D circlePoint = Point2DUtils.add(scrolledPoint,0,getRadius());
    final GlobalPosition pointOnCircleLine = GlobalPosition.from(circlePoint);
   
    circle.setCenter(GlobalPosition.from(scrolledPoint));
    circle.setCirclePoint(pointOnCircleLine);
    circle.setRadius(getRadius());
   
    addAffectedEdgesToModel(controller, circle, scrolledPoint);
   
    // return adjusted RoadEvent attribute
    event.setLocation(circle);
    return event;
  }
View Full Code Here

TOP

Related Classes of de.hpi.eworld.model.db.data.AreaModel

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.