Enumerated field definition¶
Overview¶
Next Design allows you to define input method fields that pick values from a choice. Such fields are called enumerated fields.
The following steps describe the procedure for defining enumerated fields in the following order:
- Add enumerated fields
- Delete enumeration definition
- Change enum settings
Image of enumerated field definition
Add enumerated fields¶
There are multiple ways to add enumerated fields:
- Define enum in class diagram and add fields
- Define new enum when adding fields
Define the enumeration type in the class diagram and add fields¶
To add an enumerated field in your class diagram:
Operating procedure
- Drag and drop [Enum] from the Class Toolbox and enter the name.
- [Enum Literal_1] is defined as the first option in the newly added enum type. To change the value of a choice, double-click the choice you want to change, or select it and press F2.
- To add a choice to the enumerated type, move the pointer to the value display area of the enumerated type, click the [+] icon displayed in the upper right of the value display area, and enter the value of the choice.
- This defines a set of choices as an enum.
- To add the defined enumerated type field to the entity, click the [+] icon displayed in the upper right of the field display area of the entity, and click [Add New] as in the case of adding a field to the entity. Open the Fields dialog.
- When specifying the data type in the [Add New Fields] dialog, click the [...] button at the right end of [Data Type] to open the Finder, as when specifying an existing entity. ..
- Search for the enum in the list on the Finder and click on it to populate the Data Type.
- Enter the setting items in the [Add New Fields] dialog and click the [OK] button.
- This will add an enumerated field to the entity.
define new enum when adding fields¶
To define a new enum at the same time you add a field to an entity, do the following:
Operating procedure
- Open the Add New Fields dialog as you would add a field to an entity.
- When specifying the data type in the [Add New Fields] dialog, click [New Enum Type...] from the data type choices to open the [New Enum Type] dialog.
- Enter the setting items in the [New Enum Type] dialog.
- Enums must have at least one choice. To add choices to the enum, click the + icon at the bottom right of the Enum Literals grid to open the New Enum Literal dialog.
- Enter the setting items in the [New Enum Literal] dialog and click the [OK] button to return to the [New Enum Type] dialog and add the options to the enumerated type.
- Enter the setting items in the [New Enum Type] dialog and click the [OK] button to return to the [Add New Fields] dialog and enter the enumeration type in [Data Type].
- Enter the setting items in the [Add New Fields] dialog and click the [OK] button.
- This will define the new enum and add the enum's fields to the entity at the same time.
Delete enumeration type definition¶
There are multiple ways to remove enums:
- Remove enum from metamodel
- Remove enums from class diagram (hide them in metamodel without deleting from metamodel)
remove enums from the metamodel¶
To remove an enum type from the metamodel, just as you would remove an entity:
Operating procedure
- If you want to delete the enumerated type used as the data type in the field of the entity, delete the corresponding field beforehand.
- Select the desired enum in the class diagram and select Delete From Model from the context menu.
- This will remove the target enum from the class diagram as well as from the metamodel and the target enum from the Profile Navigator.
attention
- If you select the target enumerated type in the class diagram and press the Del key, it will be deleted from the class diagram, not from the metamodel, just like [Delete From Diagram] in the context menu. , Remains on the profile navigator.
You can also remove enums from the metamodel using the following steps:
Other operating procedures
- Select the target enumerated type in the Profile Navigator and execute [Delete] from the context menu, or press the Del key.
remove enums from class diagrams¶
To remove an enum from the class diagram and hide it, follow these steps:
Operating procedure
- Select the target enumeration type in the class diagram and execute [Delete From Diagram] from the context menu, or press the Del key.
- This removes it from the class diagram but not from the metamodel, leaving the target enumerated type on the Profile Navigator. To display it again in the class diagram, do the same as Metamodel definition> Model structure definition> Add entity> Add existing entity to class diagram. Add to class diagram with.
Change enumerated type settings¶
To add choices to the enumeration or change the order of the choices, use the Inspector:
Operating procedure
- Click Display> Pane> Inspector from the ribbon to display the inspector on the right side of the screen.
- Select the target enum in the class diagram or profile navigator.
- Select Enum Type in the tab at the top of the Inspector.
- To add a choice to the enumeration type, click the [+] icon at the bottom right of the [Enum Literals] grid in the [Enum] group, and enter the setting items in the [New Enum Literal] dialog. Click the OK button.
- To remove a choice from the enumeration, select the value you want to remove in the Enum Literals grid in the Enum group and click the-icon in the lower right corner.
- To change the order of the choices defined in the enum, select the value you want to reorder in the Enum Literals grid in the Enum group and click the ↑ and ↓ icons in the bottom left. I will.