Once we have arrived at a desired element, we may need to make some modifications. Poseidon provides several ways of changing information relating to an element.
The quickest and easiest way to change information relevant to an element is to change it directly in the diagram. Be aware, however, that not all information can be changed in this way.
At this point in the tour, the Diagram pane should be displaying the class diagram for Client and the Details pane should be displaying information about the attribute login. We will now change the name of an operation from the class Client.
In the Diagram pane, double-click on the operation 'checkPassword'. The text is now editable. Change the name of the operation to 'checkPwd' and then press return or click elsewhere in the diagram.
The name change should have taken effect.
Another method of changing information is via the Details pane. Select the operation 'checkPwd' again. Notice that the Details pane provides lots of information about this operation. In the 'name' field, change the name from 'checkPwd' back to 'checkPassword' and press return or change the focus of the window by moving the mouse out of the Details pane. The change will now be reflected back in the diagram.
Creating new elements is just as simple as modifying existing ones. And just like changing elements, there are several ways to create new ones.
Perhaps we would like to associate Account Reps with Clients. Let's create a new class, AccountRep. In the Clients class diagram, click on the 'Class' button from the Diagram pane toolbar. A cross-hair appears. Click in the Diagram pane to place the new class into the diagram. Rename this class 'AccountRep' using one of the methods outlined in the previous section.
Now that we have the class, we need to associate it with the Client class. We could do this by creating a new association through the toolbar and connecting the association ends to the classes, or we could speed things up and use the aptly-named 'Rapid Buttons'. Click on the new class 'AccountRep'. Several buttons appear around the edges of the class. Click and hold the mouse button down on either the left or right rapid button. Drag the crosshair that appears onto the class Clients and release the mouse button. An association has now been created.
Now perhaps we need to make a connection between AccountRep and an office location. This will require the addition of another class and another association. One rapid button can take care of this all. Select AccountRep in the diagram. Click (and this time do not hold) the mouse button on the left or right rapid button for AccountRep. An new class and an association have been added to the diagram. Rename the new class 'Office'.
So after further review, we have decided that the class AccountRep is a good idea, but not for this diagram. We have further decided that the Office class is unnecessary and will not be used elsewhere in the model. Let's first delete Office completely.
Select the class Office in the Diagram pane. Now press the 'Del' key. A dialog box will prompt you before removing the class. Notice that the association has been deleted as well, as there is no point to an association with only one end.
The class AccountRep is a different story. We may need to use this again elsewhere, so we just want to remove it from this one diagram, not from the entire model. To remove it from this diagram, select the class in the Diagram pane. Now cut it from the diagram using either the Cut option from the main toolbar, Cut from the Edit menu, or the shortcut Ctrl-X. You will encounter a warning here as well, but it explains that the element is not deleted completely. Notice that the element no longer appears in the Navigation pane under the class diagram. Change the Navigation pane to display the Model Index view and take a look at the classes listed there. You will see that, although it is not included in any current diagrams, the class AccountRep still exists and is ready to be used in another diagram.
Take some time now to experiment with the example. Our introductory tour through the default example Softsale ends here. You received an impression of how the main tools are used, saw that most operations can be accomplished in more than one way, and eventually saw that there is a lot more to discover in and about Poseidon for UML. The next chapters will show you how edit a model and how to create your own model.