Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.AbsoluteBendpoint


            for (int i = 0; i < nodes.size(); i++) {
                Node vn = nodes.getNode(i);
                int x = vn.x;
                int y = vn.y;
                if (e.isFeedback()) {
                    bends.add(new AbsoluteBendpoint(x, y + vn.height));
                    bends.add(new AbsoluteBendpoint(x, y));
                } else {
                    bends.add(new AbsoluteBendpoint(x, y));
                    bends.add(new AbsoluteBendpoint(x, y + vn.height));
                }
            }
            conn.setRoutingConstraint(bends);
        } else {
            conn.setRoutingConstraint(Collections.EMPTY_LIST);
View Full Code Here


   
    protected void refreshBendpoints() {
        List<Point> bendpoints = ((ElementConnection) getModel()).getBendpoints();
        List<Bendpoint> constraint = new ArrayList<Bendpoint>();
        for (int i = 0; i < bendpoints.size(); i++) {
            constraint.add(new AbsoluteBendpoint(bendpoints.get(i)));
        }
        getConnectionFigure().setRoutingConstraint(constraint);
    }
View Full Code Here

    private List<AbsoluteBendpoint> constructFigureBendpointList() {
        List<Bendpoint> modelBendpoints = getModel().getBendpoints();
        List<AbsoluteBendpoint> result = new ArrayList<AbsoluteBendpoint>(modelBendpoints.size());
        for (Bendpoint bendpoint : modelBendpoints) {
            result.add(new AbsoluteBendpoint(bendpoint.getX(), bendpoint.getY()));
        }
        return result;
    }
View Full Code Here

   
    protected void refreshBendpoints() {
        List bendpoints = ((ElementConnection) getModel()).getBendpoints();
        List constraint = new ArrayList();
        for (int i = 0; i < bendpoints.size(); i++) {
            constraint.add(new AbsoluteBendpoint((Point) bendpoints.get(i)));
        }
        getConnectionFigure().setRoutingConstraint(constraint);
    }
View Full Code Here

            for (int i = 0; i < nodes.size(); i++) {
                Node vn = nodes.getNode(i);
                int x = vn.x;
                int y = vn.y;
                if (e.isFeedback()) {
                    bends.add(new AbsoluteBendpoint(x, y + vn.height));
                    bends.add(new AbsoluteBendpoint(x, y));
                } else {
                    bends.add(new AbsoluteBendpoint(x, y));
                    bends.add(new AbsoluteBendpoint(x, y + vn.height));
                }
            }
            conn.setRoutingConstraint(bends);
        } else {
            conn.setRoutingConstraint(Collections.EMPTY_LIST);
View Full Code Here

  private void refreshBendpoints() {
    DiagramConnectionPart connectionPart = getCastedModel().getModelPart();

    List<AbsoluteBendpoint> figureConstraint = new ArrayList<AbsoluteBendpoint>();
    for (Point point : connectionPart.getBendpoints()) {
      AbsoluteBendpoint bendpoint = new AbsoluteBendpoint(point.getX(), point.getY());
      figureConstraint.add(bendpoint);
    }
    getConnectionFigure().setRoutingConstraint(figureConstraint);
  }
View Full Code Here

    Bean source = (Bean) getReference().source;
    if (source.height > source.preferredHeight) {
      Rectangle rect = new Rectangle(source.x + GraphPart.MARGIN_SIZE,
          source.y + GraphPart.MARGIN_SIZE, source.width,
          source.height);
      bends.add(new AbsoluteBendpoint(rect.getBottom()));
    }

    // Create bend points for edge's virtual nodes (if any)
    NodeList nodes = edge.vNodes;
    if (nodes != null) {
      for (int i = 0; i < nodes.size(); i++) {
        Node node = nodes.getNode(i);

        // Check if edge was inverted (due to broken cycle)
        if (edge.isFeedback()) {
          bends.add(new AbsoluteBendpoint(node.x
              + GraphPart.MARGIN_SIZE, node.y
              + GraphPart.MARGIN_SIZE + node.height));
          bends.add(new AbsoluteBendpoint(node.x
              + GraphPart.MARGIN_SIZE, node.y
              + GraphPart.MARGIN_SIZE));
        } else {
          bends.add(new AbsoluteBendpoint(node.x
              + GraphPart.MARGIN_SIZE, node.y
              + GraphPart.MARGIN_SIZE));
          bends.add(new AbsoluteBendpoint(node.x
              + GraphPart.MARGIN_SIZE, node.y
              + GraphPart.MARGIN_SIZE + node.height));
        }
      }
    }
View Full Code Here

        for (int j = 0; j < nodes.size(); j++) {
          Node vn = nodes.getNode(i);
          int x = vn.x;
          int y = vn.y;
          if (e.isFeedback()) {
            bends.add(new AbsoluteBendpoint(x, y + vn.height));
            bends.add(new AbsoluteBendpoint(x, y));
          }
          else {
            bends.add(new AbsoluteBendpoint(x, y));
            bends.add(new AbsoluteBendpoint(x, y + vn.height));
          }
        }
      }
    }
  }
View Full Code Here

      for (int i = 0; i < nodes.size(); i++) {
        Node vn = nodes.getNode(i);
        int x = vn.x;
        int y = vn.y;
        if (e.isFeedback()) {
          bends.add(new AbsoluteBendpoint(x, y + vn.height));
          bends.add(new AbsoluteBendpoint(x, y));
        }
        else {
          bends.add(new AbsoluteBendpoint(x, y));
          bends.add(new AbsoluteBendpoint(x, y + vn.height));
        }
      }
      conn.setRoutingConstraint(bends);
    }
    else {
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.AbsoluteBendpoint

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.