Search in sources :

Example 16 with AbstractConnectionEditPart

use of org.eclipse.gef.editparts.AbstractConnectionEditPart in project dbeaver by serge-rider.

the class DirectedGraphLayoutVisitor method addEntityEdges.

// ******************* Entity contribution methods **********/
protected void addEntityEdges(GraphicalEditPart entityPart) {
    List<?> outgoing = entityPart.getSourceConnections();
    for (int i = 0; i < outgoing.size(); i++) {
        AbstractConnectionEditPart connectionPart = (AbstractConnectionEditPart) entityPart.getSourceConnections().get(i);
        addConnectionEdges(connectionPart);
    }
}
Also used : AbstractConnectionEditPart(org.eclipse.gef.editparts.AbstractConnectionEditPart)

Example 17 with AbstractConnectionEditPart

use of org.eclipse.gef.editparts.AbstractConnectionEditPart in project dbeaver by serge-rider.

the class DirectedGraphLayoutVisitor method applyEntityResults.

// ******************* EntityPart apply methods **********/
public void applyEntityResults(GraphicalEditPart entityPart) {
    Node n = (Node) partToNodesMap.get(entityPart);
    IFigure tableFigure = entityPart.getFigure();
    Dimension preferredSize = tableFigure.getPreferredSize();
    Rectangle bounds = new Rectangle(n.x, n.y, preferredSize.width, preferredSize.height);
    tableFigure.setBounds(bounds);
    for (int i = 0; i < entityPart.getSourceConnections().size(); i++) {
        AbstractConnectionEditPart relationship = (AbstractConnectionEditPart) entityPart.getSourceConnections().get(i);
        applyConnectionResults(relationship);
    }
}
Also used : AbstractConnectionEditPart(org.eclipse.gef.editparts.AbstractConnectionEditPart) Rectangle(org.eclipse.draw2d.geometry.Rectangle) Dimension(org.eclipse.draw2d.geometry.Dimension)

Aggregations

AbstractConnectionEditPart (org.eclipse.gef.editparts.AbstractConnectionEditPart)17 Rectangle (org.eclipse.draw2d.geometry.Rectangle)5 EditPart (org.eclipse.gef.EditPart)5 Dimension (org.eclipse.draw2d.geometry.Dimension)4 EditDomain (org.eclipse.gef.EditDomain)2 AbstractGraphicalEditPart (org.eclipse.gef.editparts.AbstractGraphicalEditPart)2 GraphicalEditPart (org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart)2 IGraphicalEditPart (org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart)2 DiagramEditDomain (org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditDomain)2 IDecorator (org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator)2 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)1 ConnLabelEditPart (org.talend.designer.core.ui.editor.connections.ConnLabelEditPart)1 ConnectionPart (org.talend.designer.core.ui.editor.connections.ConnectionPart)1 ConnectionPerformanceEditPart (org.talend.designer.core.ui.editor.connections.ConnectionPerformanceEditPart)1 NodeLabelEditPart (org.talend.designer.core.ui.editor.nodes.NodeLabelEditPart)1 NoteEditPart (org.talend.designer.core.ui.editor.notes.NoteEditPart)1 ProcessPart (org.talend.designer.core.ui.editor.process.ProcessPart)1 EdgeLabelLocator (org.yakindu.base.xtext.utils.gmf.routing.EdgeLabelLocator)1 RegionEditPart (org.yakindu.sct.ui.editor.editparts.RegionEditPart)1 TransitionEditPart (org.yakindu.sct.ui.editor.editparts.TransitionEditPart)1