Class DefaultEditPolicyFactory

java.lang.Object
org.eclipse.graphiti.ui.internal.config.AbstractConfigurationProviderHolder
org.eclipse.graphiti.ui.internal.policy.DefaultEditPolicyFactory
All Implemented Interfaces:
IConfigurationProviderHolder, IEditPolicyFactory

public class DefaultEditPolicyFactory extends AbstractConfigurationProviderHolder implements IEditPolicyFactory
A default implementation of the interface IEditPolicyFactory.
  • Field Details

    • HOVER_POLICY_KEY

      public static String HOVER_POLICY_KEY
  • Constructor Details

    • DefaultEditPolicyFactory

      public DefaultEditPolicyFactory(IConfigurationProviderInternal configurationProvider)
      Creates a new DefaultEditPolicyFactory.
      Parameters:
      configurationProvider - The IConfigurationProviderInternal, to which this factory belongs.
  • Method Details

    • dispose

      public void dispose()
      Description copied from interface: IEditPolicyFactory
      Disposes this object and frees all resources. This object will be unusable afterwards.
      Specified by:
      dispose in interface IEditPolicyFactory
    • createShapeForbidLayoutEditPolicy

      public org.eclipse.gef.EditPolicy createShapeForbidLayoutEditPolicy()
      Description copied from interface: IEditPolicyFactory
      Creates an EditPolicy, which 'forbids' any Layout dependent Commands. All methods of this EditPolicy return null, which is different from using no EditPolicy at all, because it will create a visible feedback that the requests are forbidden. This EditPolicy can for example be used for those EditParts, which do not have any children. It forbids commands for the following requests:
      • A child EditPart shall be moved from another parent-EditPart into this parent-EditPart.
      • A child EditPart shall be moved inside this parent-EditPart.
      • A new child EditPart shall be created inside this parent-EditPart (with the CreationTool).
      Specified by:
      createShapeForbidLayoutEditPolicy in interface IEditPolicyFactory
    • createShapeXYLayoutEditPolicy

      public org.eclipse.gef.EditPolicy createShapeXYLayoutEditPolicy()
      Description copied from interface: IEditPolicyFactory
      Creates an EditPolicy, where the Layout of the EditParts is important: they must have an XYLayout. It assumes, that this EditPart is a parent, whose children can be added/deleted/moved. It creates commands for the following requests:
      • A child EditPart shall be moved from another parent-EditPart into this parent-EditPart.
      • A child EditPart shall be moved inside this parent-EditPart (resized or changed XY-position).
      • A new child EditPart shall be created inside this parent-EditPart (with the CreationTool).
      Specified by:
      createShapeXYLayoutEditPolicy in interface IEditPolicyFactory
    • createShapeHighlightEditPolicy

      public org.eclipse.gef.EditPolicy createShapeHighlightEditPolicy()
      Description copied from interface: IEditPolicyFactory
      Creates an EditPolicy, which gives feedback for if an EditPart is selected. It does not create any commands. It can be used for example to do the following:
      • Highlight the selected EditPart.
      Specified by:
      createShapeHighlightEditPolicy in interface IEditPolicyFactory
    • createShapeHoverEditPolicy

      public org.eclipse.gef.EditPolicy createShapeHoverEditPolicy()
      Specified by:
      createShapeHoverEditPolicy in interface IEditPolicyFactory
    • createConnectionHighlightEditPolicy

      public org.eclipse.gef.EditPolicy createConnectionHighlightEditPolicy()
      Description copied from interface: IEditPolicyFactory
      Creates an EditPolicy give feedback for if a ConnectionEditPart is selected. This includes the connection-handles at the start/end of the connection. It does not create any commands. It can be used for example to do the following:
      • Create selection-handles at the beginning/end of the selected ConnectionEditPart.
      • Highlight the selected ConnectionEditPart.
      Specified by:
      createConnectionHighlightEditPolicy in interface IEditPolicyFactory
    • createConnectionEditPolicy

      public org.eclipse.gef.EditPolicy createConnectionEditPolicy()
      Specified by:
      createConnectionEditPolicy in interface IEditPolicyFactory
    • createDirectEditPolicy

      public org.eclipse.gef.EditPolicy createDirectEditPolicy()
      Description copied from interface: IEditPolicyFactory
      Creates an EditPolicy to handle direct-editing of EditParts. Typically not the complete EditPart shall be edited directly, but only one control of it (e.g. one Label). For this control an appropriate CellEditor would usually be shown. It creates commands for the following requests:
      • An EditPart shall be edited directly.
      Specified by:
      createDirectEditPolicy in interface IEditPolicyFactory
    • createModelObjectDeleteEditPolicy

      public org.eclipse.gef.EditPolicy createModelObjectDeleteEditPolicy(IConfigurationProvider configurationProvider)
      Description copied from interface: IEditPolicyFactory
      Creates an EditPolicy to handle the deletion of EditParts. It creates commands for the following requests:
      • An EditPart shall be deleted.
      Specified by:
      createModelObjectDeleteEditPolicy in interface IEditPolicyFactory
    • createConnectionBendpointsEditPolicy

      public org.eclipse.gef.EditPolicy createConnectionBendpointsEditPolicy()
      Specified by:
      createConnectionBendpointsEditPolicy in interface IEditPolicyFactory
    • createConnectionDeleteEditPolicy

      public org.eclipse.gef.EditPolicy createConnectionDeleteEditPolicy(IConfigurationProvider configurationProvider)
      Specified by:
      createConnectionDeleteEditPolicy in interface IEditPolicyFactory