4.2.4 Subgraphs
Making a decomposition for an object
As in the Diagram Editor, the Matrix Editor allows the user to
create a hierarchy of graphs on an unlimited number of levels. Depending on the
language in use, MetaEdit+ will thus allow the user to decompose elements of a
matrix into a new sub-graph. The sub-graph can be represented in a diagram, a
matrix or a table as desired.
To perform decomposition in the Matrix Editor:
| 1) | Select
an object from an axis (with the left mouse
button). |
| 2) | Open
its pop-up menu with the right mouse
button. |
| 3) | Select
Decomposition... from the pop-up menu. It is also
possible to select Edit | Decomposition... from the menu
bar. |
 | Decomposition
is language-dependent. Thus, not all languages use decomposition and diagram
leveling, nor is it necessarily supported in all predefined languages in
MetaEdit+. If decomposition is not allowed for the object a dialog will inform
you of this. |
Depending on your dialog
answer preferences (see Section
3.1.3)
you will be asked whether you want to attach an existing graph (if any of the
right type exist), or create a new graph as the decomposition graph of the
selected object (
Figure 4-29). If you
choose to create a new graph, you will be prompted for its type, and a property
dialog will open on a new graph of that type. In either case, you will be
prompted for which representation of the decomposition graph you want to open
(if there is only one representation, it will open straight away), or whether
you want to create a new representation.

Figure 4-29. Select the graph for the new decomposition.
To
view an existing decomposition:
| 1) | From
an axis, select an object that already has a decomposition. You may use Graph
| Graph Info... to open an Info Tool (see Section 3.3.3) to see which objects have
decompositions. |
| 2) | Open
the axis pop-up menu with the right mouse button and select
Decomposition... (or alternatively select Edit | Decomposition).
|
| 3) | Select
Open from the dialog that opens (Figure
4-30). |

Figure 4-30. Opening a decomposition graph.
As can be seen
from
Figure 4-30, you can also replace
an existing decomposition so that the selected object now decomposes to another
graph, or remove an existing decomposition link from that object.
Explosions
Explosion forms another way to connect elements of a graph to
other graphs. Unlike decomposition, explosion is also possible for relationships
and roles. It allows you to make links from a design element to several graphs,
and to allow an element to have a different explosion link in each graph where
it is used. In contrast, an object can have only one decomposition, which is the
same wherever that object is used.
The explosion command can be chosen from the selected
element’s pop-up menu, or from the Edit menu. To make, view or
remove explosions:
| 1) | Select
the element to be exploded from an axis or from a cell (with the left mouse
button). |
| 2) | Open
the pop-up menu with the right mouse button and choose Explosions... (or
alternatively choose Edit |
Explosions...). |
A dialog appears allowing
you to choose the operation for explosions. The first time only ‘add an
explosion’ is possible, but later when Explosions... is selected
the dialog includes all the exploded models and the possibility to remove
explosions.
 | If
your dialog settings (Section 3.1.3)
are set to ‘one item’, and the element has no existing explosions,
the dialog will not appear, and you will skip the next
step. |
| 3) | Choose
‘Add an explosion’ and press
OK. |
Depending on the language (and
dialog options) the tool asks which graph type and graph to explode to and opens
another Matrix Editor on an existing or new graph.
To
view or remove explosions select
Explosions... from the object, relationship, or role related pop-up menu
or from the
Edit menu of Matrix Editor.
 | Note
that any existing explosion information for the selected design element can be
seen from the Info Tool for graphs, opened with Graph | Graph
Info.... |