Search in sources :

Example 1 with ArchimateDiagramConnectionPolicy

use of com.archimatetool.editor.diagram.policies.ArchimateDiagramConnectionPolicy in project archi by archimatetool.

the class GroupEditPart method createEditPolicies.

@Override
protected void createEditPolicies() {
    // Allow parts to be connected
    installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ArchimateDiagramConnectionPolicy());
    // Add a policy to handle directly editing the Parts (for example, directly renaming a part)
    installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new PartDirectEditTitlePolicy());
    // Add a policy to handle editing the Parts (Deleting and Orphaning)
    installEditPolicy(EditPolicy.COMPONENT_ROLE, new PartComponentEditPolicy());
    // Add a policy for Native DND
    // $NON-NLS-1$
    installEditPolicy("DND", new ArchimateDNDEditPolicy());
    // Install a custom layout policy that handles dragging things around and creating new objects
    installEditPolicy(EditPolicy.LAYOUT_ROLE, new ArchimateDiagramLayoutPolicy());
    // Orphaning
    installEditPolicy(EditPolicy.CONTAINER_ROLE, new BasicContainerEditPolicy());
    // Snap to Geometry feedback
    // $NON-NLS-1$
    installEditPolicy("Snap Feedback", new SnapFeedbackPolicy());
    // Selection Feedback
    installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new ContainerHighlightEditPolicy());
}
Also used : ArchimateDiagramConnectionPolicy(com.archimatetool.editor.diagram.policies.ArchimateDiagramConnectionPolicy) ArchimateDNDEditPolicy(com.archimatetool.editor.diagram.policies.ArchimateDNDEditPolicy) ContainerHighlightEditPolicy(com.archimatetool.editor.diagram.policies.ContainerHighlightEditPolicy) ArchimateDiagramLayoutPolicy(com.archimatetool.editor.diagram.policies.ArchimateDiagramLayoutPolicy) PartDirectEditTitlePolicy(com.archimatetool.editor.diagram.policies.PartDirectEditTitlePolicy) PartComponentEditPolicy(com.archimatetool.editor.diagram.policies.PartComponentEditPolicy) BasicContainerEditPolicy(com.archimatetool.editor.diagram.policies.BasicContainerEditPolicy) SnapFeedbackPolicy(org.eclipse.gef.editpolicies.SnapFeedbackPolicy)

Example 2 with ArchimateDiagramConnectionPolicy

use of com.archimatetool.editor.diagram.policies.ArchimateDiagramConnectionPolicy in project archi by archimatetool.

the class ArchimateRelationshipEditPart method createEditPolicies.

@Override
public void createEditPolicies() {
    super.createEditPolicies();
    // Connection to connection
    installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ArchimateDiagramConnectionPolicy());
}
Also used : ArchimateDiagramConnectionPolicy(com.archimatetool.editor.diagram.policies.ArchimateDiagramConnectionPolicy)

Example 3 with ArchimateDiagramConnectionPolicy

use of com.archimatetool.editor.diagram.policies.ArchimateDiagramConnectionPolicy in project archi by archimatetool.

the class DiagramModelReferenceEditPart method createEditPolicies.

@Override
protected void createEditPolicies() {
    // Allow parts to be connected
    installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ArchimateDiagramConnectionPolicy());
    // Add a policy to handle directly editing the name
    installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new PartDirectEditTitlePolicy());
    // Add a policy to handle editing the Parts (for example, deleting a part)
    installEditPolicy(EditPolicy.COMPONENT_ROLE, new PartComponentEditPolicy());
}
Also used : ArchimateDiagramConnectionPolicy(com.archimatetool.editor.diagram.policies.ArchimateDiagramConnectionPolicy) PartDirectEditTitlePolicy(com.archimatetool.editor.diagram.policies.PartDirectEditTitlePolicy) PartComponentEditPolicy(com.archimatetool.editor.diagram.policies.PartComponentEditPolicy)

Example 4 with ArchimateDiagramConnectionPolicy

use of com.archimatetool.editor.diagram.policies.ArchimateDiagramConnectionPolicy in project archi by archimatetool.

the class NoteEditPart method createEditPolicies.

@Override
protected void createEditPolicies() {
    // Allow parts to be connected
    installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new ArchimateDiagramConnectionPolicy());
    // Add a policy to handle editing the Parts (for example, deleting a part)
    installEditPolicy(EditPolicy.COMPONENT_ROLE, new PartComponentEditPolicy());
    installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new NoteDirectEditPolicy());
}
Also used : ArchimateDiagramConnectionPolicy(com.archimatetool.editor.diagram.policies.ArchimateDiagramConnectionPolicy) PartComponentEditPolicy(com.archimatetool.editor.diagram.policies.PartComponentEditPolicy)

Aggregations

ArchimateDiagramConnectionPolicy (com.archimatetool.editor.diagram.policies.ArchimateDiagramConnectionPolicy)4 PartComponentEditPolicy (com.archimatetool.editor.diagram.policies.PartComponentEditPolicy)3 PartDirectEditTitlePolicy (com.archimatetool.editor.diagram.policies.PartDirectEditTitlePolicy)2 ArchimateDNDEditPolicy (com.archimatetool.editor.diagram.policies.ArchimateDNDEditPolicy)1 ArchimateDiagramLayoutPolicy (com.archimatetool.editor.diagram.policies.ArchimateDiagramLayoutPolicy)1 BasicContainerEditPolicy (com.archimatetool.editor.diagram.policies.BasicContainerEditPolicy)1 ContainerHighlightEditPolicy (com.archimatetool.editor.diagram.policies.ContainerHighlightEditPolicy)1 SnapFeedbackPolicy (org.eclipse.gef.editpolicies.SnapFeedbackPolicy)1