logo


The Sequence Diagram

Sequence diagrams are a good way to illustrate method calls between your classes and the order in which they occur.

To create a sequence diagram

  1. On the Diagrams menu, click New Sequence Diagram.

Messages

UML modeling defines a message as a communication between objects that can include classes, humans, and other systems. Because LumiCode is modeling your code, a more restrictive definition applies. A "message to an object" can always be thought of as a "call to a class method".

The name of a message will be the same as the name of the method that gets called. We will use the term "method" to refer to an activation of the message that gets called. So a "method" can send a "message".

To add a start message

A start message is a call to a method from outside the world of your diagram.

  1. Add start messages using the Method Tree to pick the method that is called.

  2. If the class to which the handling method belongs is not on the diagram, it will be added when you add a message.

To select a message

  1. Click on the method name or the activation box to select a message.

  2. When a message is selected, its activation box will be gray. When you add a message it will be automatically selected.

Message sequences

The messages that are sent from the currently selected method are displayed in the lower left list box. Click on the message you wish to add to your diagram.

When you wish to add several messages from the same method, you must re-select the original method after each add. This is because the newly added message will be selected after each add.

To remove a message from the diagram

  1. Click on the message you wish to remove to select it.

  2. Press the Delete key to remove the selected message from the diagram.

To add a caption or comment to your diagram

Position the mouse over your diagram and then click the right mouse button. Select Caption or Comment. Enter your text into the Comment Editor and then click OK.

To adjust the layout of your diagram

When your diagram contains all the messages you wish to display, you can fine tune the diagram by dragging the class boxes at the top of the diagram with the left mouse button. They are limited to moving horizontally.

Return to Help Contents