Collection elements are created in the usual way:
- click on the Collection button
on the toolbar, or
-
select Create from the Element menu on the Editor main window, or
-
press <Ctrl+Shift+C>.
If there was more than one icon selected previously, each of the corresponding elements will be automatically associated with the new collection element; otherwise the collection will be created with no elements.
Adding elements to a collection
If you have created an empty collection, or you wish to add further elements:
-
Select the elements you want to add, hold down the <Ctrl> key, click on one of the icons with the left mouse button, and keep the button pressed.
- Drag the mouse cursor to one side. A copy of the icons moves off the original.
-
Move the new icons over the collection icon. Notice that the mouse arrow cursor points down
when it is over the collection icon.
- Release the mouse button to add the elements to the collection.
You can also drag from the collection to an element – see 4.4.8 Connecting elements.
Alternatively, you right click on the collection and select Details from the pop-up menu. Select Insert Element into List… from the dialog Edit menu and then select the element you want to add to the collection from the Insert Element dialog (or press <Ins> to access the Insert Element dialog directly).
Note: If you want to create a collection of collections, you need to hold down the <Ctrl> and <Shift> keys to effect this action instead of the usual copy and paste metaphor for dragging between elements of the same type.
Removing an element from a collection
In order to break the link between a collection and an element:
- Right-click on the link between the icons to display a pop-up menu for the link.
- Select Unlink to break the link and remove the element from the collection.
Alternatively, you can right click on the collection and select Details from the pop-up menu. Select the element you want to remove from the Elements box and then select Remove Element from List on the dialog Edit menu (or press <Del>).
How the appearance of a collection icon changes
If you create an empty collection, the icon has the appearance of an empty ring. Watch carefully what happens when you drag, for example, a resource into the collection: a miniature version of the resource icon appears within the ring, to indicate that this is now a collection of resources rather than an empty collection. (To be precise, the icon that appears is a miniature version of the default icon for resources in this view, as selected from the Display Options dialog – see 4.18 Formatting a view.)
Figure 1: Adding a resource to an empty collection
As we shall see, the icon menu for a collection element inherits data items for the elements in the collection. This graphic device gives you a clear indication of what kind of menu you can expect a particular collection to have. If you remove all elements from the collection, the icon reverts to its ‘empty’ state; whilst if you add elements of more than one type, e.g., a resource and a service, the ring shows a miniature plain-dialog icon, showing that this collection has no effective type. (It is not possible to create a tabular dialog for a heterogeneous collection of elements.)
Note: These miniature icons are not shown if you have explicitly chosen an alternative icon for the collection.
Examples of how collections can be used
The simplest application for a collection element is to provide an arbitrary grouping and aggregation mechanism. For example, it may be convenient to group a number of resources representing various local-loop costs from a number of functions.
Figure 2: Grouping resources in the local loop
Alternatively you could develop the market segment example described in 4.11.1 Creating Services for a Market Segment by cross-aggregating the POTS and ISDN Services.
Figure 3: Cross-aggregating POTS and ISDN services
The following section explains how these generic collection elements allow you to access tabular dialogs for the corresponding data – similar to service data for market segments.