Java Code Examples for org.eclipse.draw2d.PolylineConnection#setLineStyle()
The following examples show how to use
org.eclipse.draw2d.PolylineConnection#setLineStyle() .
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: ManualOverride.java From neoscada with Eclipse Public License 1.0 | 5 votes |
/** * Set graphics attribute according to the connection state * * @param connection * the connection to change * @param state * the state */ protected void setConnectionState ( final PolylineConnection connection, final boolean state ) { final PolygonDecoration dec = new PolygonDecoration (); dec.setTemplate ( PolygonDecoration.TRIANGLE_TIP ); connection.setLineStyle ( state ? Graphics.LINE_SOLID : Graphics.LINE_DOT ); connection.setLineWidth ( state ? 2 : 1 ); connection.setTargetDecoration ( state ? dec : null ); }
Example 2
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 3
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; }