org.eclipse.draw2d.BendpointConnectionRouter Java Examples
The following examples show how to use
org.eclipse.draw2d.BendpointConnectionRouter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GenericLevelPresets.java From neoscada with Eclipse Public License 1.0 | 5 votes |
private void createConnection ( final Figure connLayer, final Label label, final Figure figure ) { final Connection c = new PolylineConnection (); c.setSourceAnchor ( new ChopboxAnchor ( label ) ); c.setTargetAnchor ( new ChopboxAnchor ( figure ) ); c.setConnectionRouter ( new BendpointConnectionRouter () ); connLayer.add ( c ); }
Example #2
Source File: AbstractERDiagramConnectionEditPart.java From ermasterr with Apache License 2.0 | 5 votes |
protected ERDiagramConnection createERDiagramConnection() { final boolean bezier = getDiagram().getDiagramContents().getSettings().isUseBezierCurve(); final ERDiagramConnection connection = new ERDiagramConnection(bezier); connection.setConnectionRouter(new BendpointConnectionRouter()); return connection; }
Example #3
Source File: CommentConnectionEditPart.java From erflute with Apache License 2.0 | 5 votes |
@Override protected IFigure createFigure() { final boolean bezier = getDiagram().getDiagramContents().getSettings().isUseBezierCurve(); final PolylineConnection connection = new ERDiagramConnection(bezier); connection.setConnectionRouter(new BendpointConnectionRouter()); connection.setLineStyle(SWT.LINE_DASH); return connection; }
Example #4
Source File: RelationEditPart.java From erflute with Apache License 2.0 | 5 votes |
@Override protected IFigure createFigure() { final boolean bezier = getDiagram().getDiagramContents().getSettings().isUseBezierCurve(); final PolylineConnection connection = new ERDiagramConnection(bezier); connection.setConnectionRouter(new BendpointConnectionRouter()); final ConnectionEndpointLocator targetLocator = new ConnectionEndpointLocator(connection, true); this.targetLabel = new Label(""); connection.add(targetLabel, targetLocator); return connection; }
Example #5
Source File: JConnection.java From JDeodorant with MIT License | 5 votes |
public PolylineConnection setSlightBendRouter(){ BendpointConnectionRouter router = new BendpointConnectionRouter(); RelativeBendpoint bp1 = new RelativeBendpoint(this); bp1.setRelativeDimensions(new Dimension(20,20), new Dimension(20, 20)); bp1.setWeight(0.5f); router.setConstraint(this, Arrays.asList(new Bendpoint[] {bp1})); this.setConnectionRouter(router); return this; }
Example #6
Source File: JConnection.java From JDeodorant with MIT License | 5 votes |
public PolylineConnection setFullBendRouter(int bendHeightX){ float weight = 0.3f; int bendHeightY = 50; int secondBendHeight = -(bendHeightX+(bendHeightX/3)); /*int gap =10; if(classWidth<0) gap = -gap-25; */ BendpointConnectionRouter router = new BendpointConnectionRouter(); RelativeBendpoint bp2 = new RelativeBendpoint(this); bp2.setRelativeDimensions(new Dimension(secondBendHeight,0), new Dimension(0,0)); bp2.setWeight(weight); RelativeBendpoint bp3 = new RelativeBendpoint(this); bp3.setRelativeDimensions(new Dimension(-bendHeightX,bendHeightY), new Dimension(-bendHeightX,-bendHeightY)); //bp1.setWeight(weight); RelativeBendpoint bp4 = new RelativeBendpoint(this); bp4.setRelativeDimensions(new Dimension(0,0), new Dimension(secondBendHeight,0)); bp4.setWeight(1 - weight); /*RelativeBendpoint bp5 = new RelativeBendpoint(this); bp5.setRelativeDimensions(new Dimension(0,0), new Dimension(-((classWidth/2)+gap),0)); bp5.setWeight(1);*/ router.setConstraint(this, Arrays.asList(new Bendpoint[] {bp2, bp3, bp4})); this.setConnectionRouter(router); return this; }
Example #7
Source File: CommentConnectionEditPart.java From ermaster-b with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} */ @Override protected IFigure createFigure() { boolean bezier = this.getDiagram().getDiagramContents().getSettings() .isUseBezierCurve(); PolylineConnection connection = new ERDiagramConnection(bezier); connection.setConnectionRouter(new BendpointConnectionRouter()); connection.setLineStyle(SWT.LINE_DASH); return connection; }
Example #8
Source File: RelationEditPart.java From ermaster-b with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} */ @Override protected IFigure createFigure() { boolean bezier = this.getDiagram().getDiagramContents().getSettings() .isUseBezierCurve(); PolylineConnection connection = new ERDiagramConnection(bezier); connection.setConnectionRouter(new BendpointConnectionRouter()); ConnectionEndpointLocator targetLocator = new ConnectionEndpointLocator( connection, true); this.targetLabel = new Label(""); connection.add(targetLabel, targetLocator); return connection; }