dcsimg
UML Sequence diagramm for activating a figure in a graphical editor
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   test_test
Posted On:   Thursday, June 9, 2005 11:44 AM

Hallo everybody, at the moment I have got a big problem: I Have to design a sequence diagramm about activating a figure like it is used in "paint" With the mouse you click on the figure and then it is activated The view-model-controller concept should be used in this case. Does anybody know how to describe such an sequence diagranmm? with GUI,Controller and Modell I thought: GUI gives Activation to Controller and Controller gives reverse back to GUI But this process is described without using the "Modell" -> I think thats no correct solution ? Thank you for helping me in this case. Goodbye Peter from Germany    More>>

Hallo everybody,

at the moment I have got a big problem: I Have to design a sequence diagramm
about activating a figure like it is used in "paint"
With the mouse you click on the figure and then it is activated
The view-model-controller concept should be used in this case.
Does anybody know how to describe such an sequence diagranmm?
with GUI,Controller and Modell

I thought: GUI gives Activation to Controller and Controller gives reverse back to GUI
But this process is described without using the "Modell"
-> I think thats no correct solution ?

Thank you for helping me in this case.

Goodbye
Peter from Germany

   <<Less

Re: UML Sequence diagramm for activating a figure in a graphical editor

Posted By:   Anonymous  
Posted On:   Friday, June 10, 2005 03:13 AM

Brother!

First of all we should know that these type of applications use objects to represent each shape in the graphic diagram. Second, each shape occupies some area on the screen. Third, in your case, we want to use MVC.

Make three Object Lifelines with labels "Window", "Control" and "Model".

The event handle "Page/Control_Click", would be the event which would be called when user would click on the screen. Draw a message between "Window" and "Control" to show this Event.

Now, from this method you would call IsShapClick(x, y): Object. This method would take (x, y) coordinates of the mouse click and go to search in the Shapes Collection of the current diagram. If this method would find (x, y) coordinates laying in an object's rectangle then it would return the object reference other wise it would return the Null. Draw a return message between "Control" and "Model" to show this method.

Now, place a condition ( like [IsShapClick(x, y) <> Null] ) to check the return value. If the return value is not null then call ActivateShape(Object) method of Model Layer. This method would deactivate the current object (if any) and activate the object received as parameter. Draw a message between "Control" and "Model" to show this method.

This is your diagram, which is implementing MVC. And the shape become activated on user click on a shape. But if user click on surface nothing would happen. Moreover, if there is some shape which is already activated then it would become deactivated.


Regards,
S. Haider Raza,
Pakistan.
About | Sitemap | Contact