UML

org.topcased.modeler.uml.sequencediagram.policies
Class LifelineLayoutEditPolicy

java.lang.Object
  extended by ModelerLayoutEditPolicy
      extended by org.topcased.modeler.uml.sequencediagram.policies.LifelineLayoutEditPolicy

public class LifelineLayoutEditPolicy
extends ModelerLayoutEditPolicy

Edit policy that handles the executions and stop on lifeline


Constructor Summary
LifelineLayoutEditPolicy()
          Default contructor.
 
Method Summary
protected  org.eclipse.gef.commands.Command createChangeConstraintCommand(org.eclipse.gef.requests.ChangeBoundsRequest request, org.eclipse.gef.EditPart child, java.lang.Object constraint)
          Don't allow the resize if some message are present
protected  org.eclipse.gef.commands.Command createChangeConstraintCommand(org.eclipse.gef.EditPart child, java.lang.Object constraint)
          Create custom command
protected  org.eclipse.gef.commands.Command getCreateCommand(org.eclipse.gef.EditDomain domain, GraphNode newObject, GraphNode newParent, EObject newContainerParent, org.eclipse.draw2d.geometry.Point location, org.eclipse.draw2d.geometry.Dimension dim, int attach, java.util.List featuresList, boolean needModelUpdate)
          Create a stop or execution creation command
protected  org.eclipse.gef.commands.Command getMoveChildrenCommand(org.eclipse.gef.Request request)
          Mustn't move in the x direction
protected  EObject getParentContainerEObject(GraphElement parent, DiagramElement child)
          The container is not the lifeline but the interaction
protected  org.eclipse.gef.commands.Command getResizeChildrenCommand(org.eclipse.gef.requests.ChangeBoundsRequest request)
          The resizing is forbidden in the 'width' way for the executions
protected  boolean isValid(EObject child, EObject parent)
          Only execution and stop are allowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifelineLayoutEditPolicy

public LifelineLayoutEditPolicy()
Default contructor.

** Generated **
Method Detail

getCreateCommand

protected org.eclipse.gef.commands.Command getCreateCommand(org.eclipse.gef.EditDomain domain,
                                                            GraphNode newObject,
                                                            GraphNode newParent,
                                                            EObject newContainerParent,
                                                            org.eclipse.draw2d.geometry.Point location,
                                                            org.eclipse.draw2d.geometry.Dimension dim,
                                                            int attach,
                                                            java.util.List featuresList,
                                                            boolean needModelUpdate)
Create a stop or execution creation command

See Also:
org.topcased.modeler.edit.policies.ModelerLayoutEditPolicy#getCreateCommand(org.eclipse.gef.EditDomain, org.topcased.modeler.di.model.GraphNode, org.topcased.modeler.di.model.GraphNode, org.eclipse.emf.ecore.EObject, org.eclipse.draw2d.geometry.Point, org.eclipse.draw2d.geometry.Dimension, int, java.util.List, boolean)

isValid

protected boolean isValid(EObject child,
                          EObject parent)
Only execution and stop are allowed

See Also:
org.topcased.modeler.edit.policies.ModelerLayoutEditPolicy#isValid(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)

getParentContainerEObject

protected EObject getParentContainerEObject(GraphElement parent,
                                            DiagramElement child)
The container is not the lifeline but the interaction

See Also:
org.topcased.modeler.edit.policies.ModelerLayoutEditPolicy#getParentContainerEObject(GraphElement, DiagramElement)

getMoveChildrenCommand

protected org.eclipse.gef.commands.Command getMoveChildrenCommand(org.eclipse.gef.Request request)
Mustn't move in the x direction

See Also:
LayoutEditPolicy.getMoveChildrenCommand(org.eclipse.gef.Request)

getResizeChildrenCommand

protected org.eclipse.gef.commands.Command getResizeChildrenCommand(org.eclipse.gef.requests.ChangeBoundsRequest request)
The resizing is forbidden in the 'width' way for the executions

See Also:
ConstrainedLayoutEditPolicy.getResizeChildrenCommand(org.eclipse.gef.requests.ChangeBoundsRequest)

createChangeConstraintCommand

protected org.eclipse.gef.commands.Command createChangeConstraintCommand(org.eclipse.gef.requests.ChangeBoundsRequest request,
                                                                         org.eclipse.gef.EditPart child,
                                                                         java.lang.Object constraint)
Don't allow the resize if some message are present

See Also:
ConstrainedLayoutEditPolicy.createChangeConstraintCommand(org.eclipse.gef.requests.ChangeBoundsRequest, org.eclipse.gef.EditPart, java.lang.Object)

createChangeConstraintCommand

protected org.eclipse.gef.commands.Command createChangeConstraintCommand(org.eclipse.gef.EditPart child,
                                                                         java.lang.Object constraint)
Create custom command

See Also:
ConstrainedLayoutEditPolicy.createChangeConstraintCommand(org.eclipse.gef.EditPart, java.lang.Object)

UML

Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.