Class ContainerEditPolicy

java.lang.Object
org.eclipse.gef.editpolicies.AbstractEditPolicy
org.eclipse.gef.editpolicies.ContainerEditPolicy
All Implemented Interfaces:
EditPolicy, RequestConstants

public abstract class ContainerEditPolicy extends AbstractEditPolicy
An EditPolicy for use with container editparts. This policy can be used to contribute commands to add, create, and orphan requests.
  • Constructor Details

    • ContainerEditPolicy

      public ContainerEditPolicy()
  • Method Details

    • getAddCommand

      protected Command getAddCommand(GroupRequest request)
      Override to contribute to add requests.
      Parameters:
      request - the add request
      Returns:
      the command contribution to the add
    • getCloneCommand

      protected Command getCloneCommand(ChangeBoundsRequest request)
      Override to contribute to clone requests.
      Parameters:
      request - the clone request
      Returns:
      the command contribution to the clone
    • getCommand

      public Command getCommand(Request request)
      Overridden to check for add, create, and orphan.
      Specified by:
      getCommand in interface EditPolicy
      Overrides:
      getCommand in class AbstractEditPolicy
      Parameters:
      request - the Request
      Returns:
      null or a Command contribution
      See Also:
    • getCreateCommand

      protected abstract Command getCreateCommand(CreateRequest request)
      Clients must implement to contribute to create requests.
      Parameters:
      request - the create request
      Returns:
      null or a command contribution
    • getOrphanChildrenCommand

      protected Command getOrphanChildrenCommand(GroupRequest request)
      Override to contribute to orphan requests.
      Parameters:
      request - the orphan request
      Returns:
      a command contribution for the orphan