If a graph model is attached to the Multiple Layout instance, the
same graph model is automatically attached to the sublayouts of
type IlvGraphModel. For the sublayout of type
IlvLabelLayout
, a default labeling model is used when possible (
IlvDefaultLabelingModel
, see Labels and obstacles in Java). This works if
the nodes, links, and labels are stored in an
IlvGrapher
.
If you implement your own labeling model (subclass of
IlvLabelingModel
), you can force the Multiple Layout to use this labeling model
instead of the default labeling model. Before you attach the graph
model, you call the method
setLabelingModel
in the following way:
multipleLayout.setLabelingModel(myLabelingModel); multipleLayout.attach(myGraphModel);
You must specify the labeling model in this way if your nodes,
links, and labels are not stored in an
IlvGrapher
but in your own data structures, because the default labeling model
is designed to handle only an
IlvGrapher
.
If the Multiple Layout instance is detached
from the graph model, all sublayouts are automatically detached as
well.