Presentation is loading. Please wait.

Presentation is loading. Please wait.

Diagram Editor Use Case Analysis Assumption: simple stand-alone, single user application. Three basic kinds of interaction of the user with the diagram.

Similar presentations


Presentation on theme: "Diagram Editor Use Case Analysis Assumption: simple stand-alone, single user application. Three basic kinds of interaction of the user with the diagram."— Presentation transcript:

1 Diagram Editor Use Case Analysis Assumption: simple stand-alone, single user application. Three basic kinds of interaction of the user with the diagram editor. 1.Creating new elements. 2.Manipulating diagram elements. 3.Modifying diagram elements by dragging a control point.

2 Creating New Elements Scenario: Creating a rectangle 1.Peter initializes a rectangle tool. 2.The shape of the cursor changes to a crosshair. 3.Peter moves the cursor a number of times. 4.Peter presses the mouse button. 5.Peter moves the cursor a number of times. 6.A faint image of a rectangle is drawn; opposite corners of the rectangle are defined by the position at which the mouse button was pressed and the current position of the cursor. The new rectangle is displayed on the screen. 7.Peter releases the mouse button. 8.The cursor reverts to its original shape. The only likely alternative in this use case is where the user decides to abandon the creation of the new element before the element is displayed.

3 Creating New Graphical Elements… Scenario: Abandoning element creation The scenario "creating a rectangle" can be interrupted after steps 2 or 3. The remainder of the scenario is then replaced by the following: 1.Peter presses the escape key. 2.Any rectangle images displayed on the screen are removed. 3.The cursor reverts to its default shape.

4 Creating New Graphical Elements… Slight incompatibility with the requirements: "After an element is created the selection tool becomes active and the newly created element is selected". If no element is created, this cannot be the case. We will change the requirements so that the selection tool never automatically becomes active. If the user wishes to select elements, the selection toll must be explicitly initialized, just as the creation tool is.

5 Creating New Graphical Elements… Use case for creating a graphical element (Word document)

6 Manipulating Elements Available manipulations include moving, copying and deleting elements, and modifications to the size and shape of elements.

7 Example: Moving elements Scenario: Moving a single element 1.Peter makes the selection tool active. 2.The cursor shape changes to an arrow. 3.Peter moves the cursor so it is over the element to be moved. 4.Peter presses the mouse button. 5.The control points of the element are displayed. 6.Peter moves the cursor; the selected element moves too, following the cursor. 7.When the new position for the element is reached, Peter releases the mouse button. A possible error in this use case arises in the situation when the user presses the mouse button at a position where there is in fact no element to be selected

8 Scenario: No Element To Select This is a variation on the basic flow described in the "moving a single element" scenario above. The first two steps of the basic flow proceed as normal, and are then followed by the following: 1.Peter moves the mouse to a position where no element is displayed. 2.Peter presses the mouse button. 3.The system beeps at the user, to indicate an error. 4.Peter moves the mouse, and finally releases the mouse button. 5.These steps are repeated as necessary, and then the basic flow carries on from step 3.

9 Example: Moving elements Scenario: Moving two elements 1.Peter makes the selection tool active. 2.The cursor shape changes to an arrow. 3.Peter moves the cursor so that it is over the first element to be moved. 4.Peter clicks the mouse button. 5.The control points of the element are displayed. 6.Peter moves the cursor so that it is over the second element to be moved. 7.Peter presses the mouse button. 8.The control points of the element are displayed 9.Peter moves the cursor; the selected elements move too, following the cursor. 10.When the new position for the element is reached, Peter releases the mouse button. Steps 3-5 can be repeated as necessary if more than two elements are to be moved.

10 Possible Error A possible error in this use case arises in the situation when the user presses the mouse button at a position where there is in fact no element to be selected Treated the same way as for a single element

11 Scenario: Unselecting Elements As well as selecting elements for manipulation, it must be possible for the user to signal that no further modifications are required to a given element. Scenario: Unselecting elements At any point in the previous scenarios, provided that the mouse button is not being held down, the escape key can be pressed. This has the effect of unselecting all the currently selected elements and terminating the use of the selection tool. As a result, all the control points are undisplayed. Scenarios combine to a complete use case.

12 Use Case for Moving Elements In the Word document

13 Example: Resizing a Single Element Scenario: Resizing a single element 1.Peter makes the selection tool active. 2.The cursor shape changes to an arrow. 3.Peter moves the cursor so that it is over the element to be resized 4.Peter presses the mouse button. 5.The control points of the element are displayed. 6.Peter releases the mouse button. 7.Peter presses the mouse button on a highlighted control point. 8.Peter moves the cursor; the selected control point moves too, and the image of the selected element changes to take into account the new position of the control point. 9.When the required new position of the control point is reached, Peter releases the mouse button.

14 Possible Error A further scenario is required for the case when the user presses the mouse button when the cursor is not positioned over a control point. In this case nothing further will happen until the mouse button is released.

15 Resizing Elements… There are no other obvious courses of events to consider in this case. It does not make a sense to talk about modifying a group of elements, as the control point that is dragged can only belong to one element, and that will be the only element that is modified. It is possible to select a group of elements, and then only modify one of them. A scenario describing this case would be a blend of the "moving two elements" and the "resizing a single element" scenarios; –it must be written.

16 Modifying Elements… Unselection of elements is handled in exactly the same way as in the use case for manipulating elements. –It is a general property of the selection tool rather than being specific to either manipulation or modification of elements. The similarities between the scenario for resizing an element and the scenario for moving elements are extensive –it is desirable to factor out the common parts with an > relationship.

17 Use Case for Selecting Elements In the Word document

18 Structuring Use Cases… Factoring out selection behavior Select element > Move elements Resize elements

19 Structuring Use Cases… Revised use case for moving elements (word document)

20 High-Level Use Case for Selection Tool > Use Selection Tool Select Element Move Elements Resize Element

21 Structuring Use Cases… The diagram shows that the functionality of the lower-level use cases can be added into the main use case, as before. The use case given can be simplified; it can assume that the required elements will automatically be selected.

22 Structuring Use Cases… Final revision of the use case for moving elements (word document)

23 Summary Use case for the selection tool (word document)


Download ppt "Diagram Editor Use Case Analysis Assumption: simple stand-alone, single user application. Three basic kinds of interaction of the user with the diagram."

Similar presentations


Ads by Google