Search in sources :

Example 11 with ConnectionLayer

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

the class ErDiagramRootEditPart method createPrintableLayers.

@Override
protected LayeredPane createPrintableLayers() {
    FreeformLayeredPane layeredPane = new FreeformLayeredPane();
    layeredPane.add(new ConnectionLayer(), CONNECTION_LAYER);
    layeredPane.add(new FreeformLayer(), PRIMARY_LAYER);
    return layeredPane;
}
Also used : ScalableFreeformLayeredPane(org.eclipse.draw2d.ScalableFreeformLayeredPane) FreeformLayeredPane(org.eclipse.draw2d.FreeformLayeredPane) FreeformLayer(org.eclipse.draw2d.FreeformLayer) ConnectionLayer(org.eclipse.draw2d.ConnectionLayer)

Example 12 with ConnectionLayer

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

the class TalendScalableFreeformRootEditPart method createPrintableLayers.

@Override
protected LayeredPane createPrintableLayers() {
    FreeformLayeredPane layeredPane = new FreeformLayeredPane();
    layeredPane.add(new FreeformLayer(), PRIMARY_LAYER);
    layeredPane.add(new ConnectionLayer(), CONNECTION_LAYER);
    return layeredPane;
}
Also used : ScalableFreeformLayeredPane(org.eclipse.draw2d.ScalableFreeformLayeredPane) FreeformLayeredPane(org.eclipse.draw2d.FreeformLayeredPane) FreeformLayer(org.eclipse.draw2d.FreeformLayer) ConnectionLayer(org.eclipse.draw2d.ConnectionLayer)

Example 13 with ConnectionLayer

use of org.eclipse.draw2d.ConnectionLayer in project dbeaver by dbeaver.

the class LockGraphEditPart method refreshVisuals.

@Override
protected void refreshVisuals() {
    ConnectionLayer connectionLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
    connectionLayer.setConnectionRouter(new ShortestPathConnectionRouter(getFigure()));
}
Also used : ShortestPathConnectionRouter(org.eclipse.draw2d.ShortestPathConnectionRouter) ConnectionLayer(org.eclipse.draw2d.ConnectionLayer)

Example 14 with ConnectionLayer

use of org.eclipse.draw2d.ConnectionLayer in project knime-core by knime.

the class WorkflowRootEditPart method refreshVisuals.

/**
 * {@inheritDoc}
 */
@Override
protected void refreshVisuals() {
    ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
    if (cLayer != null) {
        EditPartViewer viewer = getViewer();
        if (viewer != null) {
            Control c = viewer.getControl();
            if ((c != null) && ((c.getStyle() & SWT.MIRRORED) == 0)) {
                cLayer.setAntialias(SWT.ON);
            }
        }
    }
    super.refreshVisuals();
}
Also used : Control(org.eclipse.swt.widgets.Control) EditPartViewer(org.eclipse.gef.EditPartViewer) ConnectionLayer(org.eclipse.draw2d.ConnectionLayer)

Example 15 with ConnectionLayer

use of org.eclipse.draw2d.ConnectionLayer in project archi by archimatetool.

the class AbstractDiagramPart method refreshVisuals.

@Override
public void refreshVisuals() {
    // on the connection figures - see AbstractConnectionFigure
    if (AnimationUtil.doAnimate()) {
        Animation.markBegin();
    }
    ConnectionLayer cLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
    switch(getModel().getConnectionRouterType()) {
        case IDiagramModel.CONNECTION_ROUTER_MANHATTAN:
            cLayer.setConnectionRouter(new ManhattanConnectionRouter());
            break;
        case IDiagramModel.CONNECTION_ROUTER_BENDPOINT:
        default:
            AutomaticRouter router = new FanRouter();
            router.setNextRouter(new BendpointConnectionRouter());
            cLayer.setConnectionRouter(router);
            break;
    }
    if (AnimationUtil.doAnimate()) {
        Animation.run(AnimationUtil.animationSpeed());
    }
}
Also used : AutomaticRouter(org.eclipse.draw2d.AutomaticRouter) BendpointConnectionRouter(org.eclipse.draw2d.BendpointConnectionRouter) ManhattanConnectionRouter(org.eclipse.draw2d.ManhattanConnectionRouter) FanRouter(org.eclipse.draw2d.FanRouter) ConnectionLayer(org.eclipse.draw2d.ConnectionLayer)

Aggregations

ConnectionLayer (org.eclipse.draw2d.ConnectionLayer)21 FanRouter (org.eclipse.draw2d.FanRouter)5 ArrayList (java.util.ArrayList)3 BendpointConnectionRouter (org.eclipse.draw2d.BendpointConnectionRouter)3 FreeformLayer (org.eclipse.draw2d.FreeformLayer)3 FreeformLayeredPane (org.eclipse.draw2d.FreeformLayeredPane)3 ManhattanConnectionRouter (org.eclipse.draw2d.ManhattanConnectionRouter)3 ShortestPathConnectionRouter (org.eclipse.draw2d.ShortestPathConnectionRouter)3 Control (org.eclipse.swt.widgets.Control)3 WidgetEditPartFactory (org.csstudio.opibuilder.editparts.WidgetEditPartFactory)2 AutomaticRouter (org.eclipse.draw2d.AutomaticRouter)2 IFigure (org.eclipse.draw2d.IFigure)2 Layer (org.eclipse.draw2d.Layer)2 LayeredPane (org.eclipse.draw2d.LayeredPane)2 ScalableFreeformLayeredPane (org.eclipse.draw2d.ScalableFreeformLayeredPane)2 StackLayout (org.eclipse.draw2d.StackLayout)2 Dimension (org.eclipse.draw2d.geometry.Dimension)2 ContextMenuProvider (org.eclipse.gef.ContextMenuProvider)2 ScalableFreeformRootEditPart (org.eclipse.gef.editparts.ScalableFreeformRootEditPart)2 ScrollingGraphicalViewer (org.eclipse.gef.ui.parts.ScrollingGraphicalViewer)2