Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.RelativeBendpoint


     *            The {@link Connection} to attach the relative bendpoint
     *            to.
     * @return A {@link RelativeBendpoint}
     */
    public RelativeBendpoint getBendpoint(Connection conn) {
      RelativeBendpoint bp = new RelativeBendpoint(conn);
      if (end) {
        bp.setWeight(1.0f);
        bp.setRelativeDimensions(new Dimension(0, 0), new Dimension(
            offset, 0));
      } else {
        bp.setWeight(0.0f);
        bp.setRelativeDimensions(new Dimension(offset, 0),
            new Dimension(0, 0));
      }

      return bp;
    }
View Full Code Here


    return;
  List modelConstraint = getWire().getBendpoints();
  List figureConstraint = new ArrayList();
  for (int i=0; i<modelConstraint.size(); i++) {
    WireBendpoint wbp = (WireBendpoint)modelConstraint.get(i);
    RelativeBendpoint rbp = new RelativeBendpoint(getConnectionFigure());
    rbp.setRelativeDimensions(wbp.getFirstRelativeDimension(),
                  wbp.getSecondRelativeDimension());
    rbp.setWeight((i+1) / ((float)modelConstraint.size()+1));
    figureConstraint.add(rbp);
  }
  getConnectionFigure().setRoutingConstraint(figureConstraint);
}
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.RelativeBendpoint

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.