Search in sources :

Example 1 with RotatableEditPartListener

use of org.palladiosimulator.editors.sirius.custom.style.rotatable.figure.listener.RotatableEditPartListener in project Palladio-Editors-Sirius by PalladioSimulator.

the class AbstractRotatableImageEditPart method createNodeShape.

/**
 * @generated
 */
protected IFigure createNodeShape() {
    CustomStyle imageStyle = (CustomStyle) resolveSemanticElement();
    NodeImageExtension imageExtension = ExtensionActivator.getDefault().getBestImageExtension(imageStyle.getId());
    primaryShape = new RotatableSVGWorkspaceImageFigure(imageExtension.getMode(), imageExtension.getTopImage(), imageExtension.getLeftImage(), imageExtension.getBottomImage(), imageExtension.getRightImage());
    listener = new RotatableEditPartListener(this);
    primaryShape.addFigureListener(listener);
    EditPart parentEditPart = getParent();
    if (parentEditPart instanceof GraphicalEditPart) {
        GraphicalEditPart parentGraphicalEditPart = (GraphicalEditPart) parentEditPart;
        NodeListener dEdgeEditPartListener = new PropagateFigureListenerAtConnectionFigure(listener);
        parentGraphicalEditPart.addNodeListener(dEdgeEditPartListener);
    }
    return primaryShape;
}
Also used : PropagateFigureListenerAtConnectionFigure(org.palladiosimulator.editors.sirius.custom.style.rotatable.editPart.listener.PropagateFigureListenerAtConnectionFigure) RotatableSVGWorkspaceImageFigure(org.palladiosimulator.editors.sirius.custom.style.rotatable.figure.RotatableSVGWorkspaceImageFigure) NodeListener(org.eclipse.gef.NodeListener) AbstractNotSelectableShapeNodeEditPart(org.eclipse.sirius.diagram.ui.edit.api.part.AbstractNotSelectableShapeNodeEditPart) IStyleEditPart(org.eclipse.sirius.diagram.ui.edit.api.part.IStyleEditPart) GraphicalEditPart(org.eclipse.gef.GraphicalEditPart) EditPart(org.eclipse.gef.EditPart) NodeImageExtension(org.palladiosimulator.editors.sirius.custom.style.rotatable.NodeImageExtension) CustomStyle(org.eclipse.sirius.diagram.CustomStyle) GraphicalEditPart(org.eclipse.gef.GraphicalEditPart) RotatableEditPartListener(org.palladiosimulator.editors.sirius.custom.style.rotatable.figure.listener.RotatableEditPartListener)

Aggregations

EditPart (org.eclipse.gef.EditPart)1 GraphicalEditPart (org.eclipse.gef.GraphicalEditPart)1 NodeListener (org.eclipse.gef.NodeListener)1 CustomStyle (org.eclipse.sirius.diagram.CustomStyle)1 AbstractNotSelectableShapeNodeEditPart (org.eclipse.sirius.diagram.ui.edit.api.part.AbstractNotSelectableShapeNodeEditPart)1 IStyleEditPart (org.eclipse.sirius.diagram.ui.edit.api.part.IStyleEditPart)1 NodeImageExtension (org.palladiosimulator.editors.sirius.custom.style.rotatable.NodeImageExtension)1 PropagateFigureListenerAtConnectionFigure (org.palladiosimulator.editors.sirius.custom.style.rotatable.editPart.listener.PropagateFigureListenerAtConnectionFigure)1 RotatableSVGWorkspaceImageFigure (org.palladiosimulator.editors.sirius.custom.style.rotatable.figure.RotatableSVGWorkspaceImageFigure)1 RotatableEditPartListener (org.palladiosimulator.editors.sirius.custom.style.rotatable.figure.listener.RotatableEditPartListener)1