none
Force Elements inside SwimLanes RRS feed

  • Question

  • Hi All,

    I must say that I'm new in using the swim lane. I never use it before, until I started to work on my second DSL last week. I made a designer with fixed three SwimLanes with specific order. Every SwimLane has different elements from each other. And the SwimLanes themselves are owned by the model.

    My problems are just simple, but I couldn't find the answer yet. I want the element can't be moved out from its SwimLane and I want the SwimLane are not resizeable. I saw lots of threads talking about SwimLane and found interesting things, but I didn't find what I really need there.

    So far I can only show the SwimLanes in the order I wanted, do not allow making an instance of an element not in its SwimLane, and....yea basically thats it. The example of Component to force child inside its parent in SDK v.3 did not help really much.

    Really appreciate if any of you can give me some idea, or point me to other related source. It will save me lots of time. TIA.


    Regards,
    Tuesday, March 6, 2007 1:26 PM

Answers

  • Hi,

    Following steps should get you there:

    • model the container for the modelelements that can be added to a swimlane
    • add an embedding relationship between root model element and container (make the multiplicity with the root model element 1..1 to 1..1)
    • add an embedding relationship between container and modelelement that will belong to the swimlane
    • Add a swimlane shape and map it to the modelelement container

    For not having the swimlanes resizable override the property ResizableSides of the swimlane as follows:

     public override NodeSides ResizableSides
     {
        get { return NodeSides.None; }
     }

    Regards,

     

    W.

    Wednesday, March 7, 2007 8:45 PM

All replies

  • Hi,

    Following steps should get you there:

    • model the container for the modelelements that can be added to a swimlane
    • add an embedding relationship between root model element and container (make the multiplicity with the root model element 1..1 to 1..1)
    • add an embedding relationship between container and modelelement that will belong to the swimlane
    • Add a swimlane shape and map it to the modelelement container

    For not having the swimlanes resizable override the property ResizableSides of the swimlane as follows:

     public override NodeSides ResizableSides
     {
        get { return NodeSides.None; }
     }

    Regards,

     

    W.

    Wednesday, March 7, 2007 8:45 PM
  • Thanks!
    Thursday, March 8, 2007 1:49 PM