These are shown on the diagram as black text. A legend can be used to add information to the diagram - however, it does not generate any code.
Normally a Legend does not have any border, but if no text is present, a pale blue outline is displayed to allow it to be easily located.
Right clicking on a Legend brings up a popup menu showing operations that can be performed on it. These are the following: