protected void addLegendBox(int xPos, int yPos, int legendWidth, int legendHeight) { Box legendBox = ModelFactory.eINSTANCE.createBox(); MapGraphicBoxPrinter legend = new MapGraphicBoxPrinter(page); legend.setMapGraphic(MapGraphicChooserDialog.findResource(LegendGraphic.class)); legendBox.setBoxPrinter(legend); legendBox.setID("Legend Box"); // $NON-NLS-1$ legendBox.setLocation(new Point(xPos, yPos)); legendBox.setSize(new Dimension(legendWidth, legendHeight)); boxes.add(legendBox); }
protected void addScale(int xPos, int yPos, int scaleWidth, int scaleHeight) { Box scaleBox = ModelFactory.eINSTANCE.createBox(); MapGraphicBoxPrinter scale = new MapGraphicBoxPrinter(page); scale.setMapGraphic(MapGraphicChooserDialog.findResource(ScalebarMapGraphic.class)); scaleBox.setBoxPrinter(scale); scaleBox.setID("Scalebar Box"); // $NON-NLS-1$ scaleBox.setLocation(new Point(xPos, yPos)); scaleBox.setSize(new Dimension(scaleWidth, scaleHeight)); boxes.add(scaleBox); }