Package org.eclipse.gef.examples.logicdesigner.model

Examples of org.eclipse.gef.examples.logicdesigner.model.WireBendpoint


  if (getConnectionFigure().getConnectionRouter() instanceof ManhattanConnectionRouter)
    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


{

private Bendpoint oldBendpoint;

public void execute() {
  WireBendpoint bp = new WireBendpoint();
  bp.setRelativeDimensions(getFirstRelativeDimension(),
          getSecondRelativeDimension());
  setOldBendpoint((Bendpoint)getWire().getBendpoints().get(getIndex()));
  getWire().setBendpoint(getIndex(), bp);
  super.execute();
}
View Full Code Here

public class CreateBendpointCommand
  extends BendpointCommand
{

public void execute() {
  WireBendpoint wbp = new WireBendpoint();
  wbp.setRelativeDimensions(getFirstRelativeDimension(),
          getSecondRelativeDimension());
  getWire().insertBendpoint(getIndex(), wbp);
  super.execute();
}
View Full Code Here

 
    Iterator b = connection.getBendpoints().iterator();
    Vector newBendPoints = new Vector();
   
    while (b.hasNext()) {
      WireBendpoint bendPoint = (WireBendpoint)b.next();
      WireBendpoint newBendPoint = new WireBendpoint();
      newBendPoint.setRelativeDimensions(bendPoint.getFirstRelativeDimension(),
          bendPoint.getSecondRelativeDimension());
      newBendPoint.setWeight(bendPoint.getWeight());
      newBendPoints.add(newBendPoint);
    }
   
    newConnection.setBendpoints(newBendPoints);
    newConnections.add(newConnection);
View Full Code Here

TOP

Related Classes of org.eclipse.gef.examples.logicdesigner.model.WireBendpoint

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.