Search in sources :

Example 1 with PolygonDecoration

use of org.eclipse.draw2d.PolygonDecoration in project cogtool by cogtool.

the class DesignEditorMouseState method ensureDynamicTransition.

protected void ensureDynamicTransition(int startX, int startY) {
    if (potentialTransition == null) {
        potentialTransition = new PolylineConnection();
        endPtDecoration = new PolygonDecoration();
        endPtDecoration.setTemplate(PolygonDecoration.TRIANGLE_TIP);
        potentialTransition.setStart(new Point(startX, startY));
        ui.getViewEditor().addInteractionFigure(potentialTransition);
    } else if (!potentialTransition.isVisible()) {
        potentialTransition.setVisible(true);
        potentialTransition.setStart(new Point(startX, startY));
    }
}
Also used : PolygonDecoration(org.eclipse.draw2d.PolygonDecoration) Point(org.eclipse.draw2d.geometry.Point) DoublePoint(edu.cmu.cs.hcii.cogtool.model.DoublePoint) PolylineConnection(org.eclipse.draw2d.PolylineConnection)

Example 2 with PolygonDecoration

use of org.eclipse.draw2d.PolygonDecoration in project tdi-studio-se by Talend.

the class ConnectionEditPart method createFigure.

@Override
protected IFigure createFigure() {
    PolylineConnection connection = new PolylineConnection();
    connection.setTargetDecoration(new PolygonDecoration());
    curvrRouter = new CurveConnectionRouter();
    connection.setForegroundColor(ColorConstants.gray);
    connection.setLineWidth(2);
    connection.setConnectionRouter(curvrRouter);
    return connection;
}
Also used : PolygonDecoration(org.eclipse.draw2d.PolygonDecoration) CurveConnectionRouter(org.talend.designer.gefabstractmap.figures.routers.CurveConnectionRouter) PolylineConnection(org.eclipse.draw2d.PolylineConnection)

Example 3 with PolygonDecoration

use of org.eclipse.draw2d.PolygonDecoration in project tdi-studio-se by Talend.

the class FilterConnectionPart method createFigure.

@Override
protected IFigure createFigure() {
    PolylineConnection connection = new PolylineConnection();
    connection.setTargetDecoration(new PolygonDecoration());
    connection.setForegroundColor(ColorProviderMapper.getColor(ColorInfo.COLOR_UNSELECTED_FILTER_LINK));
    connection.setLineWidth(2);
    return connection;
}
Also used : PolygonDecoration(org.eclipse.draw2d.PolygonDecoration) PolylineConnection(org.eclipse.draw2d.PolylineConnection)

Example 4 with PolygonDecoration

use of org.eclipse.draw2d.PolygonDecoration in project cubrid-manager by CUBRID.

the class RelationshipPart method createFigure.

@Override
protected IFigure createFigure() {
    TablePart sourceTablePart = (TablePart) this.getSource();
    TablePart targetTablePart = (TablePart) this.getTarget();
    IFigure source = sourceTablePart == null ? null : sourceTablePart.getFigure();
    IFigure target = targetTablePart == null ? null : targetTablePart.getFigure();
    ConnectionFigure conn = new ConnectionFigure(source, target);
    conn.setConnectionRouter(new ERConnectionRouter());
    conn.setTargetDecoration(new PolygonDecoration());
    return conn;
}
Also used : ERConnectionRouter(com.cubrid.common.ui.er.router.ERConnectionRouter) PolygonDecoration(org.eclipse.draw2d.PolygonDecoration) ConnectionFigure(com.cubrid.common.ui.er.figures.ConnectionFigure) IFigure(org.eclipse.draw2d.IFigure)

Example 5 with PolygonDecoration

use of org.eclipse.draw2d.PolygonDecoration in project cubrid-manager by CUBRID.

the class ConnectionPart method createFigure.

/**
	 * @see org.eclipse.gef.editparts.AbstractConnectionEditPart#createFigure()
	 * @return conn
	 */
protected IFigure createFigure() {
    PolylineConnection conn = new PolylineConnection();
    conn.setTargetDecoration(new PolygonDecoration());
    conn.setConnectionRouter(new BendpointConnectionRouter());
    return conn;
}
Also used : PolygonDecoration(org.eclipse.draw2d.PolygonDecoration) BendpointConnectionRouter(org.eclipse.draw2d.BendpointConnectionRouter) PolylineConnection(org.eclipse.draw2d.PolylineConnection)

Aggregations

PolygonDecoration (org.eclipse.draw2d.PolygonDecoration)9 PolylineConnection (org.eclipse.draw2d.PolylineConnection)6 ManhattanConnectionRouter (org.eclipse.draw2d.ManhattanConnectionRouter)2 Point (org.eclipse.draw2d.geometry.Point)2 ConnectionFigure (com.cubrid.common.ui.er.figures.ConnectionFigure)1 ERConnectionRouter (com.cubrid.common.ui.er.router.ERConnectionRouter)1 HAConnectionFigure (com.cubrid.cubridmanager.ui.mondashboard.editor.figure.HAConnectionFigure)1 DoublePoint (edu.cmu.cs.hcii.cogtool.model.DoublePoint)1 BendpointConnectionRouter (org.eclipse.draw2d.BendpointConnectionRouter)1 IFigure (org.eclipse.draw2d.IFigure)1 PointList (org.eclipse.draw2d.geometry.PointList)1 CurveConnectionRouter (org.talend.designer.gefabstractmap.figures.routers.CurveConnectionRouter)1 LookupConnectionRouter (org.talend.designer.gefabstractmap.figures.routers.LookupConnectionRouter)1