3.2 Matrix Editor
 | See
also the Menu Reference, Section
7.7. |
The
Matrix Editor
is a tool for handling graphs by
representing them as matrices
, containing two axes and
related cells.
Figure 3-28 shows a
Matrix Editor window.

Figure 3-28. Matrix Editor.
The Matrix Editor follows the
same rules as other MetaEdit+ tools. Each element, whether it is on an axis or
in a cell, has dialog(s) for adding, viewing and editing further information
about the element. Accordingly, modifications made in an element via the Matrix
Editor are stored to the repository and reflected in other tools.
The Matrix Editor is capable of representing and editing
any graph of any type, even if the graph was originally created with a Diagram
or Table Editor. Thus the Matrix Editor can be used both to view graphs first
made as graphical diagrams, like Data Flow Diagrams, and to work with
specifically matrix-based
methods (like Business Systems
Planning, which is almost totally matrix based).
The Matrix Editor offers the special functions needed for
working with matrix based graphs. Some examples of these are diagonalisation,
subsystem decomposition, and viewing.
3.2.1 Matrices
Opening graphs with the Matrix Editor:
To open a Matrix Editor:
1) | Select
Editors | Matrix Editor in the
Launcher. |
2) | Select
a graph, e.g. ‘Sales and inventory’, from the dialog that will
appear (as in Figure 3-29), and click
OK. Alternatively, you can double click a graph to choose it and close
the
dialog. |
3) | Select
a representation from the dialog that appears, and click OK. If you want
to make a new representation select ‘Create new Matrix’. This
selection opens the selected graph but allows you to make a different
representation version of it. Thus, you can choose a different layout and subset
of the objects in the graph. |

Figure 3-29. A dialog for selecting a graph.
 | The
dialog for representation selection does not appear if you are creating the
first matrix representation for the graph and your dialog answer preferences are
set to ‘one item’ (see Section
2.1.3 Options
Tool). |
You should now have a Matrix Editor
opened on a graph as shown in
Figure 3-30. The figure shows the same
‘Sales system’ graph we already looked at with the Diagram Editor,
but now it is represented in matrix form. Depending on your preferences the
toolbar below the menu bar of the Matrix Editor may not be visible.
 | By
keeping shift pressed during the open operation, you can open the graph without
locking it. This is especially useful in a multi-user environment when you just
want to view the graph and allow another user to change it at the same
time. |

Figure 3-30. Matrix Editor open on a Data Flow Diagram.
Creating matrixes
To create a new matrix:
1) | Select
Editors | Matrix Editor in the
Launcher. |
2) | Select
the last item, ‘create new graph’, from the dialog, and click
OK.
|
3) | Choose a
method from the method list
(Figure 3-31) and a property dialog
opens for the new graph.
|
4) | Fill in the
properties and press OK and an empty Matrix Editor will open on the new
graph. |

Figure 3-31. Selecting a graph type to create.
Managing matrices
As in all editors in MetaEdit+, the
Graph menu allows
users to create, open and edit graphs. For example, the same function that was
previously used to open a matrix can be accessed from
Graph | Open... as
well.
Similarly, a new matrix can be created by selecting
Graph | New... and by following the instructions above.
To edit the properties of the graph itself select
Graph
| Properties..., and a dialog similar to that in
Figure 3-32 will appear. In the dialog,
the properties of the graph can be edited and modifications accepted by clicking
OK.

Figure 3-32. Properties of the graph ‘Sales system’.
The
Matrix Editor also
includes a menu selection
Graph |
Matrix Info... that opens a dialog showing detailed information about the
matrix. An example of the matrix information dialog is shown in
Figure 3-33.

Figure 3-33. Matrix information dialog.
The Graph menu also
includes functions to view a matrix based graph in other tools of MetaEdit+.
Basically, the Graph | View functions open a new tool for the given
representation (i.e. diagram, matrix, table or browser).
Accessing reports
All reporting functions in the Matrix Editor can be accessed
through the Graph menu. To select a report to be run:
1) | Select
Graph | Reports | Run....
|
2) | Choose a
report from the dialog list and press OK.
Figure 3-34 shows an example of a dialog
list for choosing a report. |

Figure 3-34. Selecting a report to run.
After you have
selected a report, the tool runs it and opens a window showing the report
output, or a dialog showing the file(s) to which report output has been sent
(see
Figure 3-9).
You can also access the report definition tool to make new
reports or to modify existing ones. To do this choose
Graph | Reports |
Create. The reporting tools are explained in more detail in Section
4.1.
Printing a matrix
To print the matrix select Graph | Print.... You are
first asked for the printer, then for the scale of the printout or how many
pages you want to print over. By default, printing is of the whole used area of
the matrix on a single page.
When you press
OK in the print scale dialog the
output is sent to the printer. You may also use a print preview tool by pressing
Preview button. The preview tool shows the output a page at a time.
Pressing the
Print button actually sends the output to the printer and
closing the window cancels printing. You can choose to print only the visible
area of the matrix or the whole matrix, at a specific scale or over a certain
number of pages. These more advanced features are described in Section
4.2.
Often, a better option than printing for large matrices is
to export the matrix to a word processor or spreadsheet, as described below, and
format and print it from there.
Exporting a matrix
To export the matrix as tab-separated ASCII or an HTML table
select Graph | Reports | ASCII Export or Graph | Reports | HTML
Export. These export functions open a report output tool from which the
matrix can be saved into a file or copied directly into external programs such
as word processors, spreadsheets or textual HTML editors.
Closing a Matrix Editor
To exit from a Matrix Editor select
Graph | Exit or use
some other platform dependent closing mechanism, like clicking the top right
corner of the window.
3.2.2 Objects
All the basic functions needed to create, edit, link and
delete elements in a matrix are collected in the pop-up menus of the axes and
cells. In the following we shall explain how different elements of a matrix can
be managed.
Adding objects
Objects in the Matrix Editor form the axes of the matrix.
To add new objects to an axis:
1) | Click
the left mouse button at the place on the axis before which you want to add an
object (if there is no selection the object will be added at the end).
|
2) | Open the axis
pop-up menu with the right mouse
button. |
3) | Select
Add... from the
menu. |
 | If
you have not previously selected an object type to create from the Types
menu or the toolbar a dialog opens showing the possible object types to be
created. Figure 3-35 shows such a dialog
for Data Flow Diagrams. |

Figure 3-35. Selecting an object type to be added.
4) | An
empty property dialog opens allowing you to enter design information about the
object created. In the case of adding a Store in the ‘Sales system’
graph the dialog looks like that in
Figure 3-36. Enter the properties for
the object and click OK. |

Figure 3-36. Dialog for adding a store.
Adding existing objects
In many cases it is more practical to reuse design elements
already defined and stored in the repository than to create new elements. This
is especially true in matrices when the same object is often needed on both
axes.
To add an existing object:
1) | Click
the left mouse button at the place on the axis before which you want to add an
object. |
2) | Open
the pop-up menu with the right mouse
button. |
3) | Select
Add Existing... from the
menu. |
4) | As a
result a dialog, as in Figure 3-37,
opens allowing you to pick objects that are already defined in this
graph. |
5) | Choose
one or more of the objects in the list and press
OK. |

Figure 3-37. Selecting existing object(s) to add.
The
dialog in
Figure 3-37 also has
additional functions for more complex reuse situations: to fetch information
from other graphs even if they have other representations, i.e. a diagram or a
table. These options can be selected from the last two items in the list.
The first of these, ‘
Get some objects from
another graph’ opens a new dialog
(
Figure 3-38) for selecting a source
graph from which elements are to be reused.

Figure 3-38. Selecting target graph for reuse.
 | Please
note that only those objects can be reused whose type is legal in the target
diagram. For example in a Data Flow Diagram you can only fetch processes,
stores, externals, or notes. Thus, if you select an incompatible graph such as a
Class Diagram, there will be no objects available from there for reuse in the
Data Flow Diagram. Depending on your dialog answer preferences (see Section
2.1.3) the tool will not add any objects
to the diagram, or it will open an empty dialog showing that no objects can be
reused from that graph. |
The second reuse
option, ‘
Get some objects of a given type’, first offers a
dialog for selecting the object type to be reused (similar to that in
Figure 3-35) and then offers a list of
all the objects of the selected type currently loaded in MetaEdit+.
For example, in a Data Flow Diagram when the selected
object type is ‘Process’ a dialog list like that in
Figure 3-39 opens. It contains a list of
all processes that are used in any loaded graph.
 | The
dialog also includes those processes that are part of the matrix that is already
opened in the Matrix Editor. Also, objects of that type may exist that have not
yet been loaded, and hence not appear in the
dialog. |

Figure 3-39. List of all processes to be reused.
When you
press OK, the objects selected will be added into the matrix. If you edit
any of these objects, i.e. change the information about the object through a
property dialog, the change will be immediately propagated to that object
elsewhere, and therefore also available to all graphs and tools that use the
same object. If you want to avoid these updates, you should create new objects
into the matrix instead of reuse.
Editing objects
Information about each object can be edited by selecting
Properties... from the pop-up menu. There are also two shortcuts: double
click with the mouse and pressing Enter on the keyboard.
As a result a property dialog opens allowing you to edit
the information related to the object. See Section
2.3.1 for more information on property
dialogs.
Moving objects
You can also change the positions of objects on an axis. To do
this:
1) | Select
the object to be moved on the axis with the left mouse button.
|
2) | Open the
pop-up menu with the right mouse
button. |
3) | Select
Move from the
menu. |
4) | Click
the left mouse button on the same axis for a new
location. |
Deleting objects
The axis pop-up menu also includes an operation for removing
objects from an axis (Delete).
To remove an object from an axis:
1) | Select
it with the left mouse
button. |
2) | Open
the pop-up menu with the right mouse
button. |
3) | Choose
Delete. |
As a result of the operation
the object disappears from that position on that axis. There are however,
further actions that may happen if that object is not represented in any other
representation of this graph, depending on the different deletion policies that
you can choose through the Options Tool (see Section
2.1.3).
3.2.3 Relationships and Roles
Managing relationships and roles
Relationships and roles form connections between objects. In
the Matrix Editor these are represented in the cells of the matrix. Each row in
the matrix has an object in the vertical axis, and each column in the horizontal
axis. Thus each cell is defined by two objects, a row object and a column
object, and if those objects are related either a relationship or role is shown
as an entry in that cell. In the rest of this section we will refer to
relationships: the operations are also applicable when roles are being viewed
(selected in the View menu).
Relationships and roles
can be viewed and edited similarly
to objects. The fastest way to edit properties is double clicking.
Alternatively, you can first select the item and then either press enter or
choose
Properties... from the pop-up menu. If there are several
relationships between the objects — and thus several elements in the same
cell — a dialog box appears for selecting the right relationship.
Figure 3-40 shows an example of a
relationship selection dialog.

Figure 3-40. Selection dialog for a relationship.
As a
result of the operation, a property dialog opens allowing you to edit the
information about the relationship.
Figure 3-41 illustrates an example of a
property dialog for a flow named ‘Request for check’.

Figure 3-41. A relationship property dialog.
Adding relationships
To add a new relationship:
1) | Select
the cell in a matrix between the desired objects on the axes.
|
2) | Open the
pop-up menu with the right mouse
button. |
3) | Select
Add... from the pop-up menu.
|
 | Selection
of the right kind of relationship works similarly to objects. When you create a
relationship a dialog opens showing possible relationship
types. You can reduce the number of items in the dialog
by choosing a default type for new relationships in this Matrix Editor from the
Types menu or from the
toolbar. |
Double clicking also works as a
shortcut for adding relationships. Note that this works only if the cell is
empty: otherwise it shows the properties of the existing relationship.
As a result a dialog window opens with possible
relationships to be added. Each item is a binding of the relationship and the
roles that will be created with the relationship, and which object will be in
which role. If only one combination of relationships and roles is possible the
tool bypasses this dialog and the property dialog appears immediately. This
dialog contains a notebook allowing you to enter design information about the
relationship and roles.
 | If
a relationship or a role does not have properties, the tab label text on the
notebook page is italicised. The tab label for roles also shows the name of the
object to which that role
attaches. |
4) | Fill
in the properties of the new relationship and roles. Use the tab labels of the
notebook to move between relationship and role
pages. |
5) | Accept
the new relationship by clicking All OK.
|
The relationship is added to the matrix, and
will be shown in the cell in accordance with your view and format
settings.
N-ary relationships
The Matrix Editor does not show n-ary relationships.
Moving a relationship or a role
As with objects, relationships and roles can also be moved. To
move a relationship:
1) | Select
a cell. |
2) | Open a
pop-up menu from the
dialog. |
3) | Choose
Move from the
menu. |
4) | Click a
new position in the matrix. |
Relationships
cannot be moved in a matrix if there is a Diagram representation of the same
graph.
Deleting a relationship or a role
To delete a relationship in a matrix:
1) | Select
a cell of the
relationship. |
2) | Open
a pop-up menu from the
cell. |
3) | Choose
Delete from the menu. |
Note that there
are different deletion policies that you can choose through the Options Tool
(Section
2.1.3). Relationships and roles
cannot be deleted in a Matrix if there is a Diagram representation of the same
graph: delete the relationship in the Diagram, and the change will be propagated
to the matrix next time you choose
View | Refresh.
3.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
method in use, MetaEdit+ will thus allow the user to decompose elements of a
matrix into a new sub-graph. The sub-graph can be either a diagram, a matrix or
a table depending on the user’s wish.
In decomposition, knowledge about the connections of the
decomposed element is stored in the sub-graph as well as the parent graph,
allowing you to maintain consistency between different levels, and to reuse
decompositions with a consistent interface. Thus, decomposition is normally used
only between graphs of the same method.
In MetaEdit+ two ways of decomposition creation are
supported: decomposing a single object (top-down) or grouping multiple objects
into a new object (bottom-up). In the first case you select a single object and
make a new lower-level subgraph in which you describe its decomposition. In the
latter case you group together a set of objects on an axis and move them into a
new lower-level subgraph.
To perform decomposition for a single object 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
Subgraphs | Decomposition... from the pop-up menu.
It is also possible to select Edit | Decomposition... from the menu
bar. |
You will be asked whether you want to
attach an existing graph, or create a new graph, as the decomposition graph of
the selected object (
Figure 3-42). 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.
 | Decomposition
is method-dependent. Thus, not all methods use decomposition and diagram
levelling, nor is it necessarily supported in all predefined methods in
MetaEdit+. If decomposition is not allowed for the object the tool opens a
notification dialog. |

Figure 3-42. Select the graph type for the new decomposition.
To
view an existing decomposition:
1) | From
an axis, select an object which already has a decomposition. You may use the
Info Tool for graphs (see Section 2.3.3)
to see which objects have
decompositions. |
2) | Open
the axis pop-up menu with the right mouse
button. |
3) | Select
Subgraphs | Decomposition....
|
4) | Select
Open from the dialog that opens
(Figure 3-43). |

Figure 3-43. Opening a decomposition graph.
As can be seen
from
Figure 3-43, 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.
Grouping objects into a decomposition
The Matrix Editor also allows you to make a decomposition
graph from a set of adjacent objects on an axis, by grouping them together into
a new subgraph. In the current (parent) matrix they are replaced by a new object
whose decomposition is the new lower-level matrix.
To make several objects into a new decomposition
graph:
1) | Group
the objects together so that they are adjacent on the same axis. You can move
objects using Move from the pop-up menu, with Move... in an Axis
Tool, or by sorting them with an operation in the Analysis
menu. |
2) | Select
the first of the objects with the left mouse
button. |
3) | Select
Subgraphs | Make into Decomposition... from the
pop-up menu or from Edit in the menu
bar. |
4) | Mark the
end of the range of the objects you want by clicking it with the mouse (now a
cross-hair cursor). At least half of the cell must be between the cross-hair and
the first object selected. |
As a result, a new
graph is created and the selected objects together with their relationships are
moved to this new graph. During the decomposition the tool will ask for two sets
of information:
1) | The
type and properties for the new
subgraph. |
2) | The
type and properties for the object to be created to substitute for the elements
moved to the subgraph. |
As the last step of
making the decomposition, you will be prompted for the type of representation to
open on the new subgraph: Diagram, Matrix or Table, and the corresponding editor
will open, showing the new subgraph containing the objects you moved.
 | Note
that this kind of decomposition can only be performed if there are no other
representations of this graph. Also, if you have a matrix which does not have
the same objects on both axes, and you want relationships to be moved with
objects into a subgraph, it is easiest to first add existing objects from one
axis on to the other axis, so you can select the full set of objects at once.
All representations of the objects moved will be removed from this matrix,
including representations on the other
axis. |
You may sometimes decide that an
object in this matrix should actually belong to a subgraph of another object in
this matrix. To move an object from this matrix into an existing
subgraph:
1) | Select
the object to be moved on an
axis. |
2) | Select
Subgraphs | Move to Decomposition... from the
pop-up menu. |
3) | A
dialog will open, showing all objects in this graph which have decompositions.
Choose an object and press OK.
|
 | If
your dialog answer options (see 2.1.3)
are set to auto-answer dialogs with one element, and there is only one possible
decomposition, step 3 will be omitted and the selected object moved directly to
the decomposition graph. |
You can also
replace an object that has a decomposition with all the elements from its
decomposition by selecting
Subgraphs | Replace with
Decomposition from the pop-up menu or from the
Edit menu.
Alternatively, you could remove the decomposition link
without adding the elements of the decomposition by selecting
Subgraphs |
Decomposition... and
Remove (see
Figure 3-43). In this case the elements
of the subgraph are not added to the matrix, but only the link to the subgraph
itself is removed.
Explosions
Explosion
forms another way to connect
elements of a graph to other graphs. Objects, relationships and roles can have
explosions, whereas only an object can have a decomposition. The difference from
decomposition is that explosion creates a simpler link between an element and a
graph, whereas decomposition also handles the relationships attached to the
object. Unlike decomposition, explosion allows you to make links from an element
to several graphs, and to have different links for the same element used in
different graphs, whereas an object can have only one decomposition, which is
the same wherever that object is used.
Explosion is often used between graphs from different
methods. 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. |
3) | Choose
Subgraphs | Explosions... from the
menu. |
A dialog
(
Figure 3-44) appears allowing you to
choose the operation for explosions. The first time only ‘add an
explosion’ is possible, but later when
Explosion... is selected the
dialog includes all the exploded models and the possibility to remove
explosions.

Figure 3-44. Adding an explosion.
 | If
your dialog settings (Section 2.1.3) are
set to ‘one item’, and the element has no existing explosions, the
dialog in Figure 3-44 will not appear,
and you will skip the next
step. |
4) | Choose
‘Add an explosion’ and press
OK. |
Depending on the method (and dialog
options) the tool asks which method and graph to explode to and opens another
Matrix Editor on an existing or new graph.
Figure 3-45 shows an example dialog for
explosion of a ‘Process’ in a Data Flow Diagram.

Figure 3-45. A dialog for selecting a graph type for the explosion.
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.... |
3.2.5 Viewing and formatting
The Matrix Editor offers a wide variety of options to modify
the layout and representation of a matrix. In the following list some of these
features are collected with their functions and uses.
 | Hiding
or showing symbols of axis objects. If the method in use has graphical
symbols you can choose whether you want to see them in the matrix. Basically
three possibilities are available: to see only the text for the objects, or only
the symbols of the objects, or both text and symbols. This function can be
accessed from the Axis
menu. |
 | Hiding
or showing symbols of cell relationships/roles. As with objects, you can
also choose whether you want to see the textual description of
relationships/roles, their symbols or both. These options can be selected from
the Cell
menu. |
 | Hiding
columns. To temporarily hide an object on the
horizontal axis select Hide or Show from the pop-up menu of the
column. The command View | Show All Columns automatically shows all the
objects that have been
hidden. |
 | Viewing
relationships or roles. Depending on the matrix representation you may want
to show either the relationship or one of the roles in a cell: the role attached
to the object of the cell’s row, or that attached to the object of the
cell’s column. To set different viewing options select them from the
View
menu. |
 | Viewing
of properties. The kind of text displayed for each
role or relationship in a cell can be modified. By selecting Cell | Text
Display... a dialog like that in
Figure 3-46 opens showing the possible
options. For example by selecting “Just an ‘X’” the
appearance of the matrix changes to that in
Figure 3-47. You can also hide those
elements in the cells that do not have any properties by selecting Cell |
Hide Propertyless?. |

Figure 3-46. Selecting option for text display.

Figure 3-47. ‘Just an X’ display in a matrix.
 | Choosing
fonts. By selecting Format
| Font... a dialog opens allowing you to choose a font and style for your
purposes (Figure 3-48). The fonts
available are not those that are standard on your platform, as this would harm
platform independence. |

Figure 3-48. Dialog for selecting font.
 | Setting
widths of columns. Column widths can be adjusted by
selecting Format | Column Widths.... This opens a dialog for setting each
column width. Figure 3-49 shows the
Column Widths Tool: start and end show which columns the
setting will affect. You can set the width with the slider, which is to the same
scale as the actual column width. If your column is wider than the dialog, you
can make the dialog wider by dragging the bottom-right resize corner; you can
also type the width in pixels directly in the Width box. To apply your changes
press Save & Close. You can make changes to multiple ranges by
pressing Save and then selecting a new range and width.
|

Figure 3-49. Column Widths tool.
 | Setting
row labels’ width. As with column widths, the
width of the column containing the labels of the rows (vertical axis) can be
set. To do this select Format | Row Labels’ Width...
(Figure 3-50). |

Figure 3-50. Setting row labels’ width.
 | Autowidth
automatically sets row and column widths according to the longest axis
element. |
 | Showing
the whole matrix. The View | Fit Window to Matrix
command scales the window to show the whole of the matrix. If the matrix is
larger than your screen, your operating system may force the window to be
smaller than the matrix.
|
3.2.6 Organising objects
Axis Tool
The Axis Tool allows the user to make changes quickly to many
items on the axes without refreshing the matrix after each change. It is
especially useful for creating new graphs from scratch or working with large
matrices.
To open the axis tool select
Axis | Axis Tool....
This operation open a tool as illustrated in
Figure 3-51.

Figure 3-51. Axis tool.
The axis tool consist of two
lists, in which the list on the left shows which of the two axes you are working
on and that on the right the items on the selected axis. Through the pop-up menu
of the items list you can perform operations for adding, deleting and moving
items. Delete from Matrix deletes all occurrences of the selected object
from the matrix (useful if the same object is on both axes).
Diagonalisation
Because of the matrix representation, some matrix specific
functionality is naturally incorporated in the Matrix Editor. One typical
example is diagonalisation, and another is sorting.
The diagonalisation of a matrix is performed simply. To do
this just select Analysis | Diagonalise. As a result the elements of the
currently selected axis are re-organised so that relationships between elements
are located close to the diagonal.
Sorting
Analysis | Sort... allows you to sort the elements on
the horizontal and vertical axis. The sorting can be ascending or descending
based on alphabetical order of object names, with or without their
types.