Annotating and Illustrating Diagrams

From RAD Studio
Jump to: navigation, search

Go Up to UML Diagram Procedures

This topic explains how to use notes to annotate diagrams, and images to illustrate diagrams.


Notes and Comments

You can use notes and source code comments to annotate diagrams.

Managing notes

In the Diagram View and Model View, you can:

  • Hyperlink a note to another diagram or element.
  • Edit the note text, using the in-place editor of the Object Inspector.
  • Edit the note properties, using the Object Inspector.
  • Add an existing note from one diagram to another diagram, using a shortcut. Use Add > Shortcuts from the context menu of any diagram.
  • Define the foreground and background colors, using the Object Inspector.
  • Set the TextOnly property defining whether the note has frame, using the Object Inspector.

Creating note links

  1. Click the Note Link button on the Tool Palette.
  2. In the Diagram View, click the source element.
  3. Drag the link to the destination element.
  4. Drop when the second element is highlighted.
Tip: You can use the Object Inspector to view both the client and supplier sides of the link.

Managing comments

In implementation projects you can enter "source code comments" that will be inserted in the source code:

  • To enter comments into the source code (for the class, interface), use the "comment" fields (Author, Since, Version) in the Object Inspector .
  • You can also enter such source code comments directly into the source code using the Code Editor.


Images

You can use images to illustrate diagrams.

To insert an image

  1. In the Diagram View, click the Image button on the Tool Palette. The button stays down.
  2. Click the diagram background in the place where you want to draw an image. The image node appears, but this node is empty. You need to specify the image to show.
  3. Click the image node; the Properties page of the Object Inspector shows the properties of the selected image node. Click the Image path option and then click the ellipsis ... button; the Select Image File dialog box opens. Here you can select the image file to use. Click Open. The image stored in the selected file renders in the image node.
  4. Click the Proportional option and select the True value. Now you can resize the image node changing proportions of the node frame -- the image is resized proportionally to fill the new frame.

To draw links from diagram elements to positions in images

Image links connect diagram elements with specific places (image points) inside images. So image links can show which parts of images illustrate different diagram elements.

  1. In the Diagram View, click the Image Link button on the Tool Palette. The button stays down.
  2. Click in an image to specify the Image point to which the image link points.
  3. Click a diagram element to which the image link points. Thus you create the image link connecting the specified image point and the specified diagram element.

To set an image to draw the background of diagrams

  1. Click Tools > Options.
  2. In the Options dialog box, choose the General group in the Modeling > (level) > Diagram > Appearance category.
  3. Click the Diagram background image file option and click the ellipsis ... button. The Select Image File dialog box opens. Here you can select the image file to use. Click Open. You have selected the file storing the image to fill the background.
Depending on the selected (level), the specified image:
  • Fills the background of the current diagram.
  • Becomes the default image to fill the backgrounds of all diagrams in the current project.
  • Becomes the default image to fill the backgrounds of all diagrams in the current project group.
  • Becomes the default image to fill the backgrounds of diagrams.
Here (level) is used to specify the selection among the Diagram, Project, Project Group, or Default branches in the Modeling options tree. (See Hierarchical Levels of Modeling options in the Modeling Options dialog box topic for more information).
  1. Click Diagram background image mode and select the Backdrop value to draw the image behind the diagram elements.
  2. If you select the Overdrop mode, then the image draws in front of the diagram elements; the image will obscure the diagram elements.
  3. To make diagram elements partially visible through the image, click the Diagram background image transparency option and type a value between 0 and 1. When the value is 0, the image is totally transparent (becomes invisible). When the value is 1, the image partially hides diagram elements.


See Also