Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.Connection.translateToRelative()


    com.setLocation(p);

    Point ref1 = getConnection().getSourceAnchor().getReferencePoint();
    Point ref2 = getConnection().getTargetAnchor().getReferencePoint();

    conn.translateToRelative(ref1);
    conn.translateToRelative(ref2);

    com.setRelativeDimensions(p.getDifference(ref1), p.getDifference(ref2));
    com.setDiagramConnectionModel((DiagramConnectionModel) request.getSource().getModel());
    com.setIndex(request.getIndex());
View Full Code Here


    Point ref1 = getConnection().getSourceAnchor().getReferencePoint();
    Point ref2 = getConnection().getTargetAnchor().getReferencePoint();

    conn.translateToRelative(ref1);
    conn.translateToRelative(ref2);

    com.setRelativeDimensions(p.getDifference(ref1), p.getDifference(ref2));
    com.setDiagramConnectionModel((DiagramConnectionModel) request.getSource().getModel());
    com.setIndex(request.getIndex());
    return com;
View Full Code Here

protected Command getCreateBendpointCommand(BendpointRequest request) {
  CreateBendpointCommand com = new CreateBendpointCommand();
  Point p = request.getLocation();
  Connection conn = getConnection();
 
  conn.translateToRelative(p);
 
  com.setLocation(p);
  Point ref1 = getConnection().getSourceAnchor().getReferencePoint();
  Point ref2 = getConnection().getTargetAnchor().getReferencePoint();
 
View Full Code Here

 
  com.setLocation(p);
  Point ref1 = getConnection().getSourceAnchor().getReferencePoint();
  Point ref2 = getConnection().getTargetAnchor().getReferencePoint();
 
  conn.translateToRelative(ref1);
  conn.translateToRelative(ref2);
 
 
  com.setRelativeDimensions(p.getDifference(ref1),
          p.getDifference(ref2));
View Full Code Here

  com.setLocation(p);
  Point ref1 = getConnection().getSourceAnchor().getReferencePoint();
  Point ref2 = getConnection().getTargetAnchor().getReferencePoint();
 
  conn.translateToRelative(ref1);
  conn.translateToRelative(ref2);
 
 
  com.setRelativeDimensions(p.getDifference(ref1),
          p.getDifference(ref2));
  com.setWire((Wire)request.getSource().getModel());
View Full Code Here

protected Command getMoveBendpointCommand(BendpointRequest request) {
  MoveBendpointCommand com = new MoveBendpointCommand();
  Point p = request.getLocation();
  Connection conn = getConnection();
 
  conn.translateToRelative(p);
 
  com.setLocation(p);
 
  Point ref1 = getConnection().getSourceAnchor().getReferencePoint();
  Point ref2 = getConnection().getTargetAnchor().getReferencePoint();
View Full Code Here

  com.setLocation(p);
 
  Point ref1 = getConnection().getSourceAnchor().getReferencePoint();
  Point ref2 = getConnection().getTargetAnchor().getReferencePoint();
 
  conn.translateToRelative(ref1);
  conn.translateToRelative(ref2);
 
  com.setRelativeDimensions(p.getDifference(ref1),
          p.getDifference(ref2));
  com.setWire((Wire)request.getSource().getModel());
View Full Code Here

 
  Point ref1 = getConnection().getSourceAnchor().getReferencePoint();
  Point ref2 = getConnection().getTargetAnchor().getReferencePoint();
 
  conn.translateToRelative(ref1);
  conn.translateToRelative(ref2);
 
  com.setRelativeDimensions(p.getDifference(ref1),
          p.getDifference(ref2));
  com.setWire((Wire)request.getSource().getModel());
  com.setIndex(request.getIndex());
View Full Code Here

        current.translateToAbsolute(ref2);

        start = current.getSourceAnchor().getLocation(ref1).getCopy();
        end = current.getTargetAnchor().getLocation(ref2).getCopy();

        current.translateToRelative(start);
        current.translateToRelative(end);
        points.setPoint(start, 0);
        points.setPoint(end, points.size() - 1);

        current.setPoints(points);
View Full Code Here

        start = current.getSourceAnchor().getLocation(ref1).getCopy();
        end = current.getTargetAnchor().getLocation(ref2).getCopy();

        current.translateToRelative(start);
        current.translateToRelative(end);
        points.setPoint(start, 0);
        points.setPoint(end, points.size() - 1);

        current.setPoints(points);
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.