0 Replies Latest reply: Mar 15, 2011 5:25 AM by 837480 RSS

    Delegate actions handling

    837480
      Hi everyone,

      I have to write an app who allow users to draw plan by dragging and dropping predefined shapes et stretching/rotating these shapes. I want to have reusable components so I wonder how I can manage actions like "resize", "rotate", "move", "delete", .. because in some case "resizing" a shape cannot make this shape bigger than his parent or some shapes cannot be resized. So I'm looking for a good pattern to achieve that.

      I think at something like "handlers" (I don't know which pattern match that) where I have one "ResizeHandler" that is responsible for resizing a Shape and thus check is she isn't bigger than his parent or if she can be resized. But I'm not sure that is the best option and I don't really know how to realize that..

      Can someone help me ?

      Thanks