/**
* calculates the size of the model basing on model-position and
* -width/-height
*/
private void calculateModelSize() {
ModelElementContainer elements = editor.getModelProcessor().getElementContainer();
AbstractPetriNetElementModel element = null;
modelSize = new Dimension(100, 100);
for (String elementId : elements.getIdMap().keySet()) {
element = elements.getElementById(elementId);
int elementNameWidth = element.getNameModel().getNameValue()
.length() * 7;
// TODO: The best would be taking the size of the blue box itself
if (element.getX() + element.getWidth() + elementNameWidth > modelSize.width) {
modelSize.width = element.getX() + element.getWidth()