}
private Rectangle addMapBox( Map map, int width, int height, final int labelHeight, int scaleHeight,
int legendWidth ) {
Box mapBox = ModelFactory.eINSTANCE.createBox();
MapBoxPrinter mapBoxPrinter = new MapBoxPrinter();
mapBox.setID("Standard Map Box"); //$NON-NLS-1$
mapBox.setBoxPrinter(mapBoxPrinter);
mapBoxPrinter.setMap(map);
// calculate mapSize
int bothMargins = (MARGIN * 2);
int mapWidth = width - bothMargins - legendWidth-SPACING;
int labelAndSpacing = labelHeight + SPACING;