Package org.eclipse.draw2d.geometry

Examples of org.eclipse.draw2d.geometry.Point


  }

  public void setPositiveLocation(Rectangle r)
  {
    this.setConstraint(r);
    Point loc = this.getLocationAbs();

    if (loc.x < 0)
    {
      loc.x = 0;
    }
View Full Code Here


  protected List children;

  public CompoundModel()
  {
    this(new Rectangle(new Point(0, 0), CompoundModel.DEFAULT_SIZE));
  }
View Full Code Here

    inspectorAction.run();
  }

  public void mouseDown(MouseEvent e)
  {
    clickLocation = new Point(e.x,e.y);
    popupManager.setClickLocation(clickLocation);
    getViewer().getControl().setMenu(
      popupManager.createContextMenu(getViewer().getControl()));
  }
View Full Code Here

      popupManager.createContextMenu(getViewer().getControl()));
  }

  public void mouseUp(MouseEvent e)
  {
    clickLocation = new Point(e.x,e.y);
  }
View Full Code Here

    inspectorAction.run();
  }

  public void mouseDown(MouseEvent e)
  {
    clickLocation = new Point(e.x,e.y);
    popupManager.setClickLocation(clickLocation);
    getViewer().getControl().setMenu(
      popupManager.createContextMenu(getViewer().getControl()));
  }
View Full Code Here

      popupManager.createContextMenu(getViewer().getControl()));
  }

  public void mouseUp(MouseEvent e)
  {
    clickLocation = new Point(e.x,e.y);
  }
View Full Code Here

      {
        Rectangle bound = calculateBounds();
        Dimension diff =
          getLocationAbs().getDifference(bound.getLocation());

        setLocationAbs(new Point(bound.x - this.MARGIN_SIZE,
          bound.y - this.MARGIN_SIZE));
        setSize(new Dimension(bound.width + (2 * this.MARGIN_SIZE),
          bound.height + (2 * this.MARGIN_SIZE) + this.LABEL_HEIGHT));

        Iterator iter = this.children.iterator();
View Full Code Here

    while (itr.hasNext())
    {
      NodeModel node = (NodeModel) itr.next();

      Point locAbs = node.getLocationAbs();
      Dimension size = node.getSize();
      nodeTop = locAbs.y;
      nodeLeft = locAbs.x;
      nodeRight = locAbs.x + size.width;
      nodeBottom = locAbs.y + size.height;

      if (top > nodeTop)
      {
        top = nodeTop;
      }

      if (left > nodeLeft)
      {
        left = nodeLeft;
      }

      if (right < nodeRight)
      {
        right = nodeRight;
      }

      if (bottom < nodeBottom)
      {
        bottom = nodeBottom;
      }
    }

    // Checks the bendpoints' locations.
    if (this.isRoot)
    {
      itr = this.getEdges().iterator();
    }
    else
    {
      itr = this.getEdgeIterator(ALL_EDGES, true, true);
    }

    while (itr.hasNext())
    {
      EdgeModel edge = (EdgeModel) itr.next();
      edge.updateBendpoints();

      for (int i = 0; i < edge.bendpoints.size(); i++)
      {
        EdgeBendpoint eb = (EdgeBendpoint) edge.bendpoints.get(i);
        Point loc = eb.getLocationFromModel(edge);

        int x = loc.x;
        int y = loc.y;

        if (top > y)
View Full Code Here

      conn.setVisible(false);
      return true;
    }
    if (list1.size() == list2.size())
    {
      Point pt1 = new Point(), pt2 = new Point();
      PointList points = conn.getPoints();
      points.removeAllPoints();
      for (int i = 0; i < list1.size(); i++)
      {
        list1.getPoint(pt2, i);
View Full Code Here

    PointList points1 = (PointList) initialStates.get(conn);
    PointList points2 = conn.getPoints().getCopy();

    if (points1 != null && points1.size() != points2.size())
    {
      Point p = new Point(), q = new Point();

      int size1 = points1.size() - 1;
      int size2 = points2.size() - 1;

      int i1 = size1;
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.geometry.Point

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.