Search in sources :

Example 1 with SnapFeedbackPolicy

use of org.eclipse.gef.editpolicies.SnapFeedbackPolicy in project tdi-studio-se by Talend.

the class ProcessPart method createEditPolicies.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.gef.editparts.AbstractEditPart#createEditPolicies()
     */
@Override
protected void createEditPolicies() {
    installEditPolicy(EditPolicy.LAYOUT_ROLE, new ProcessLayoutEditPolicy());
    //$NON-NLS-1$
    installEditPolicy("Snap Feedback", new SnapFeedbackPolicy());
}
Also used : SnapFeedbackPolicy(org.eclipse.gef.editpolicies.SnapFeedbackPolicy)

Example 2 with SnapFeedbackPolicy

use of org.eclipse.gef.editpolicies.SnapFeedbackPolicy 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 3 with SnapFeedbackPolicy

use of org.eclipse.gef.editpolicies.SnapFeedbackPolicy in project archi by archimatetool.

the class ArchimateDiagramPart method createEditPolicies.

@Override
protected void createEditPolicies() {
    // Install a custom layout policy that handles dragging things around
    installEditPolicy(EditPolicy.LAYOUT_ROLE, new ArchimateDiagramLayoutPolicy());
    // Install a policy for DND support
    // $NON-NLS-1$
    installEditPolicy("DND", new ArchimateDNDEditPolicy());
    // Install a Container Policy for orphaning child parts
    installEditPolicy(EditPolicy.CONTAINER_ROLE, new BasicContainerEditPolicy());
    // Snap to Geometry feedback
    // $NON-NLS-1$
    installEditPolicy("Snap Feedback", new SnapFeedbackPolicy());
}
Also used : ArchimateDNDEditPolicy(com.archimatetool.editor.diagram.policies.ArchimateDNDEditPolicy) ArchimateDiagramLayoutPolicy(com.archimatetool.editor.diagram.policies.ArchimateDiagramLayoutPolicy) BasicContainerEditPolicy(com.archimatetool.editor.diagram.policies.BasicContainerEditPolicy) SnapFeedbackPolicy(org.eclipse.gef.editpolicies.SnapFeedbackPolicy)

Example 4 with SnapFeedbackPolicy

use of org.eclipse.gef.editpolicies.SnapFeedbackPolicy in project archi by archimatetool.

the class StickyEditPart method createEditPolicies.

@Override
protected void createEditPolicies() {
    // Allow parts to be joined together
    installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new SketchConnectionPolicy());
    // Add a policy to handle directly editing the Part
    installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new StickyDirectEditTitlePolicy());
    // Add a policy to handle deletion and orphaning
    installEditPolicy(EditPolicy.COMPONENT_ROLE, new PartComponentEditPolicy());
    // Add a DND Policy
    // $NON-NLS-1$
    installEditPolicy("DND", new SketchDNDEditPolicy());
    // Install a custom layout policy that handles dragging things around and creating new objects
    installEditPolicy(EditPolicy.LAYOUT_ROLE, new DiagramLayoutPolicy());
    // 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 : ContainerHighlightEditPolicy(com.archimatetool.editor.diagram.policies.ContainerHighlightEditPolicy) SketchDNDEditPolicy(com.archimatetool.editor.diagram.sketch.policies.SketchDNDEditPolicy) SketchConnectionPolicy(com.archimatetool.editor.diagram.sketch.policies.SketchConnectionPolicy) PartComponentEditPolicy(com.archimatetool.editor.diagram.policies.PartComponentEditPolicy) DiagramLayoutPolicy(com.archimatetool.editor.diagram.policies.DiagramLayoutPolicy) BasicContainerEditPolicy(com.archimatetool.editor.diagram.policies.BasicContainerEditPolicy) SnapFeedbackPolicy(org.eclipse.gef.editpolicies.SnapFeedbackPolicy)

Example 5 with SnapFeedbackPolicy

use of org.eclipse.gef.editpolicies.SnapFeedbackPolicy in project archi by archimatetool.

the class SketchDiagramPart method createEditPolicies.

@Override
protected void createEditPolicies() {
    // Install a custom layout policy that handles dragging things around
    installEditPolicy(EditPolicy.LAYOUT_ROLE, new DiagramLayoutPolicy());
    // Install a policy for DND support
    // $NON-NLS-1$
    installEditPolicy("DND", new SketchDNDEditPolicy());
    // And we need to install this Group Container Policy here as well as in the GroupEditpart
    installEditPolicy(EditPolicy.CONTAINER_ROLE, new BasicContainerEditPolicy());
    // Snap to Geometry feedback
    // $NON-NLS-1$
    installEditPolicy("Snap Feedback", new SnapFeedbackPolicy());
}
Also used : SketchDNDEditPolicy(com.archimatetool.editor.diagram.sketch.policies.SketchDNDEditPolicy) DiagramLayoutPolicy(com.archimatetool.editor.diagram.policies.DiagramLayoutPolicy) BasicContainerEditPolicy(com.archimatetool.editor.diagram.policies.BasicContainerEditPolicy) SnapFeedbackPolicy(org.eclipse.gef.editpolicies.SnapFeedbackPolicy)

Aggregations

SnapFeedbackPolicy (org.eclipse.gef.editpolicies.SnapFeedbackPolicy)12 BasicContainerEditPolicy (com.archimatetool.editor.diagram.policies.BasicContainerEditPolicy)6 ContainerHighlightEditPolicy (com.archimatetool.editor.diagram.policies.ContainerHighlightEditPolicy)4 PartComponentEditPolicy (com.archimatetool.editor.diagram.policies.PartComponentEditPolicy)4 ArchimateDNDEditPolicy (com.archimatetool.editor.diagram.policies.ArchimateDNDEditPolicy)3 CanvasDNDEditPolicy (com.archimatetool.canvas.policies.CanvasDNDEditPolicy)2 ArchimateDiagramLayoutPolicy (com.archimatetool.editor.diagram.policies.ArchimateDiagramLayoutPolicy)2 DiagramLayoutPolicy (com.archimatetool.editor.diagram.policies.DiagramLayoutPolicy)2 PartDirectEditTitlePolicy (com.archimatetool.editor.diagram.policies.PartDirectEditTitlePolicy)2 SketchDNDEditPolicy (com.archimatetool.editor.diagram.sketch.policies.SketchDNDEditPolicy)2 XYLayout (org.eclipse.draw2d.XYLayout)2 WholeComponentEditPolicy (org.whole.lang.ui.editpolicies.WholeComponentEditPolicy)2 WholeContainerEditPolicy (org.whole.lang.ui.editpolicies.WholeContainerEditPolicy)2 WholeFreeformLayoutEditPolicy (org.whole.lang.ui.editpolicies.WholeFreeformLayoutEditPolicy)2 EntityXYLayout (org.whole.lang.ui.layout.EntityXYLayout)2 CanvasConnectionPolicy (com.archimatetool.canvas.policies.CanvasConnectionPolicy)1 ArchimateContainerEditPolicy (com.archimatetool.editor.diagram.policies.ArchimateContainerEditPolicy)1 ArchimateContainerLayoutPolicy (com.archimatetool.editor.diagram.policies.ArchimateContainerLayoutPolicy)1 ArchimateDiagramConnectionPolicy (com.archimatetool.editor.diagram.policies.ArchimateDiagramConnectionPolicy)1 SketchConnectionPolicy (com.archimatetool.editor.diagram.sketch.policies.SketchConnectionPolicy)1