Package de.hpi.eworld.gui.util

Examples of de.hpi.eworld.gui.util.Polygon2D


   * updates all the cached values
   *
   * @param state
   */
  private void updateCache(mxCellState state) {
    Polygon2D polygon = getParent().getBasicShape();
    Rectangle2D boundsOnGraph = getParent().canvasBounds(state);

    offset = new Point2D.Double(boundsOnGraph.getX() - polygon.getBounds2D().getMinX(), boundsOnGraph.getY()
        - polygon.getBounds2D().getMinY());

    scaledPolygon = getParent().getScaledShape();
  }
View Full Code Here


   *
   * @param event
   */
  public PolygonEventView(PolygonEventModel event) {
    super(event, true, false);
    basicShape = new Polygon2D(new double[] { -18, -5, 18, 18, -12 },
        new double[] { -7, -18, -18, 16, 18 }, 5);
  }
View Full Code Here

  @Override
  public Rectangle2D getInitialBounds() {
    PolygonLocationModel model = (PolygonLocationModel) getModelElement()
        .getLocation();
    Polygon2D poly = new Polygon2D();
    for (GlobalPosition p : model.getPoints()) {
      poly.addPoint(p.projected());
    }

    return poly.getBounds2D();
  }
View Full Code Here

TOP

Related Classes of de.hpi.eworld.gui.util.Polygon2D

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.