Search in sources :

Example 6 with PartDirectEditTitlePolicy

use of com.archimatetool.editor.diagram.policies.PartDirectEditTitlePolicy 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)

Aggregations

PartComponentEditPolicy (com.archimatetool.editor.diagram.policies.PartComponentEditPolicy)6 PartDirectEditTitlePolicy (com.archimatetool.editor.diagram.policies.PartDirectEditTitlePolicy)6 ArchimateDNDEditPolicy (com.archimatetool.editor.diagram.policies.ArchimateDNDEditPolicy)2 ArchimateDiagramConnectionPolicy (com.archimatetool.editor.diagram.policies.ArchimateDiagramConnectionPolicy)2 ContainerHighlightEditPolicy (com.archimatetool.editor.diagram.policies.ContainerHighlightEditPolicy)2 SketchConnectionPolicy (com.archimatetool.editor.diagram.sketch.policies.SketchConnectionPolicy)2 SnapFeedbackPolicy (org.eclipse.gef.editpolicies.SnapFeedbackPolicy)2 CanvasConnectionPolicy (com.archimatetool.canvas.policies.CanvasConnectionPolicy)1 ArchimateContainerEditPolicy (com.archimatetool.editor.diagram.policies.ArchimateContainerEditPolicy)1 ArchimateContainerLayoutPolicy (com.archimatetool.editor.diagram.policies.ArchimateContainerLayoutPolicy)1 ArchimateDiagramLayoutPolicy (com.archimatetool.editor.diagram.policies.ArchimateDiagramLayoutPolicy)1 BasicContainerEditPolicy (com.archimatetool.editor.diagram.policies.BasicContainerEditPolicy)1