The Class Diagram

Class diagrams are used to show the inheritance relationships between classes in your project. They are also a good way to document the method and field members of each class.

Creating a class diagram

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

Adding a class to the diagram

  1. Add classes to your diagram using the Class Tree or the Auto Select Bar.

  2. LumiCode will automatically layout your diagram anytime something is added to it.

To display methods and fields

  1. Click on a class to select it.

  2. Click on the items you want to display on the method and field tabs.

You can also use the Access Selection Bar to rapidly select methods and fields based on their access levels

Select all methods and fields.

Select public methods and fields.

Select protected methods and fields.

Select private methods and fields.

Unselect all methods and fields.

Removing a class from the diagram

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

  2. Press the Delete key to remove the selected class from the diagram. Alternately, use Remove selected on the right click menu.

  3. Classes can also be toggled off and on the diagram with the Class Tree.

Showing system classes

  1. Check the Show System checkbox to include classes from the System namespace in the class tree. This will let you put them on your diagram. Show System also affects selections made by the selection arrow. Leaving this unchecked can help keep your diagrams from becoming cluttered.

Showing class details

  1. Check the Show Details checkbox to display details for all the classes on the diagram.

Adding a caption to your diagram

  1. Position the mouse over your diagram and then click the right mouse button. Select Add caption. Enter your text into the Caption Editor.

  2. Click Change Font if you wish to change the font, font size, or text color.

  3. Click OK. Items on the diagram will be moved down to make room for the caption.

Adding a comment to your diagram

  1. Position the mouse over your diagram and then click the right mouse button. Select Add comment. Enter your text into the Comment Editor.

  2. Click Change Font if you wish to change the font, font size, or text color.

  3. Click OK, and then click on the diagram where you want the comment to appear.

  4. An existing comment can be edited by right clicking on it, then selecting Edit.

  5. The comment box width can be adjusted by dragging the left or right edge with the mouse.

Adding comments from code to your diagram

When you see the comment symbol, it means there is a code comment available for the class and you can place it on your diagram with the Auto Comment feature.

To add an Auto Comment:

  1. Position the mouse over the class you want to add a comment for, and then click the right mouse button. Select Comment from code.

  2. Click on the diagram where you want the comment to appear.

Adjusting the layout of your diagram

When your diagram contains all the classes you wish to display, you can fine tune the appearance by dragging the classes on the diagram with the left mouse button. The horizontal bar can be positioned by dragging up and down.

If you spend time tweaking your diagram, and then add something, your tweaking will be lost. For this reason, you should put everything you need on the diagram before you begin tweaking.

Class access symbols

Methods and fields in a class have access levels to indicate their visibility to other classes. These access levels are indicated in LumiCode (as in UML) as follows:

-

private

#

protected

+

public