Both inner classes and inner interfaces in diagrams display within their own compartment field within the class, as shown:
To create an inner class (when the class already exists), drag it over another class and drop it.
You can also use one of the following methods:
Using the context menu:
Right click on the parent class.
Select New > Inner Class from the context menu.
Using Cut, Copy, and Paste:
Use the clipboard operations to either Cut or Copy an existing inner class.
Select the parent class.
Use the clipboard operations to Paste the selected class into the parent class.
TIP: You can use drag and drop or clipboard operations to remove inner classes from the parent class, transforming them into a normal class. Classes do not keep the same visibility after removing them from the parent class.
To edit an inner class:
From the menubar, select Window > Show View > Properties.
Select the element from either the UML Navigator or Diagram view.
Edit the fields in the Properties view as necessary.
To rename an inner class, choose one of the following methods:
Using in-place editing:
In the Diagram view, double click the element's name to enable in-place editing.
Enter the new name.
Click Enter, or click in the diagram to apply the changes.
Using the context menu:
Right click on the element in either the UML Navigator or Diagram view.
Select Rename from the context menu.
Enter the new name.
Click Enter, or click in the diagram to apply the changes.
Using the Properties view:
From the menubar, select Window > Show View > Properties.
Select the inner class.
Edit the name field in the Properties view.
Press Enter, or click in the UI to apply the changes.