5.7 Element Children Containers

Children Containers make it easy to use the bind language to create a container of an element’s children. After a Children Container is added to a drawing, you can:

NOTE:Stack containers are another type of container that can be added to a drawing. Stack containers are especially useful when creating new node styles as they can layer multiple objects which can be hidden or shown based on a condition that is met. For more information about Stack Containers, see Section 9.6, Looking at the Source Code with a Toggling Graphic Node Style Example.

5.7.1 Adding Containers for Child Elements

To add a child container to a drawing:

  1. In the Explorer pane, navigate to the desired element under Elements or Service Models, then open the Layout view.

  2. Right-click the background of the Layout View, and select New Drawing.

    All elements are removed leaving the Layout view empty and in Edit Mode.

  3. Right-click the Layout View, and select Customize > Container > Add > Children Container.

    A child container displaying all elements displays:

  4. To filter the elements, do the following:

  5. Adjust the display, as desired.

    In this example, we’ll adjust the layout and sort by condition.

    Do the following:

    1. Right-click the container, then select Customize > Child Container > Layout > Adjust Layout to open the Adjust Layout dialog box.

    2. Select the 4 radio button from Columns.

    3. Click OK to close the Adjust Layout dialog box.

    4. Right-click the container, then select Customize > Child Container > Layout > Sorting to open the Adjust Sorting dialog box.

    5. Select the Ascending radio button from Sort Direction.

    6. Select the Condition radio button from Sort By.

    7. Click OK.

      The Adjust Sorting dialog box closes:

  6. To update with the desired node style, do the following:

    1. Right-click the container, then select Change Group.

    2. From the Explorer pane, expand Administration > Graphics > Nodes.

    3. Navigate within the Nodes folder until you find the desired node style.

      HINT:Be careful not to select any of the objects under Nodes, else the Layout view changes focus and leaves the Layout drawing you are working with.

    4. Drag the selected node style over onto one of the elements inside the Layout view container.

    5. Select Change Node Style for All Nodes from the pop‑up menu.

      All element nodes update with the new node style:

    6. Right-click the container, then select Save Group.

5.7.2 Customizing a Child Container

Child Containers can be customized to display every configuration of elements that you need. The following sections address the various options you can apply on Child Containers:

Adjusting Element Depth and Maximum Children

To set element depth and maximum children:

  1. In the drawing, right-click the container, then select Customize > Child Container > Depth > Adjust Depth. The Adjust Depthdialog box opens.

  2. To change the number of levels of children to include, select one of the Depth radio buttons.

  3. To set the maximum number of children to display, specify the number in the Max Children field.

  4. Click OK.

    The view updates to repect the depth and maximum number specified.

Adding Filtering Commands

To customize filtering:

  1. In the drawing, right-click the container, then select Customize > Child Container > Filtering > Adjust Filtering. The Adjust Filtering dialog box opens.

  2. Do any of the following:

    • To include the parent element in the container, select the Include “self” in layout radio button.

    • To filter on all child elements (even when the parent element does not match the filter), select the Check children under non-matching elements radio button. When unselected, the filter looks for matching elements only when a parent element matches the filter criteria.

    • To filter elements based on name, specify filter criteria in the Name Filter field.

      Enter a regular expression to define, based on element name, which elements are acceptable to display.

    • To filter elements based on dname, specify filter criteria in the DName Filter field.

      Enter a regular expression to define, based on element dname, which elements are acceptable to display.

    • To filter elements based on class, specify filter criteria in the Class Name Filter field.

      Enter a regular expression to define, based on element class, which elements are acceptable to display.

    • To filter elements based on condition, select any of the Condition Filter options.

      Elements with the selected conditions display.

    • To create a custom filter, enter FormulaScript code in the Script Filter field.

  3. Click OK.

    The view updates to filter the elements.

Adding Sorting Commands

To customize sorting:

  1. In the drawing, right-click the container, then select Customize > Child Container > Sorting > Adjust Sorting. The Adjust Sortingdialog box opens.

  2. To change the sort direction, select the None, Ascending, or Descending radio button.

  3. To change the criteria to sort by, select the Condition, Name, DName, or Class radio button.

  4. Click OK.

    The view updates to sort the elements.

Adjusting the Layout Type and Layout Options

There are many types of layouts available for a container that set how components are displayed in the container. Grid and Flow layouts have additional settings for configuration.

To change the layout type and set layout settings:

  1. In the drawing, right-click the container, then select Customize > Child Container > Layout > Set Children Layout. The Set Children Layout dialog box opens.

  2. Select the layout type in the drop-down list.

  3. To include the parent element in the container, select the Include “self” in layout radio button.

  4. Click OK.

    The view updates to the new layout type.

  5. To adjust setting on a Grid Layout, right-click the container and select Customize > Child Container > Layout > Adjust Grid Layout. The Adjust Grid Layout dialog box opens.

    Specify options as desired for the number of columns, node alignment, spacing widths, column width and row height.

    Click OK.

  6. To adjust setting on a Flow Layout, right-click the container and select Customize > Child Container > Layout > Adjust Flow Layout. The Adjust Flow Layout dialog box opens.

    Specify options as desired for the spacing and width.

    Click OK.