protected int addLabelBox(
      String text,
      int xPos,
      int yPos,
      int labelWidth,
      int labelHeight,
      int fontSize,
      float scaleFactor) {
    Box labelBox = ModelFactory.eINSTANCE.createBox();
    labelBox.setSize(new Dimension(labelWidth, labelHeight));
    labelBox.setLocation(new Point(xPos, yPos));
    LabelBoxPrinter labelBoxPrinter = new LabelBoxPrinter(scaleFactor);
    labelBox.setBoxPrinter(labelBoxPrinter);

    labelBox.setID("Standard Label"); // $NON-NLS-1$
    labelBoxPrinter.setText(text);
    labelBoxPrinter.setHorizontalAlignment(SWT.CENTER);
    try {
      FontData data = Display.getDefault().getSystemFont().getFontData()[0];

      data.setHeight(fontSize);
      data.setStyle(SWT.BOLD);

      Font font = AWTSWTImageUtils.swtFontToAwt(data);
      labelBoxPrinter.setFont(font);

    } catch (Exception e) {
      // oh well don't have that font type
    }
    boxes.add(labelBox);
    return labelHeight;
  }
 public Image getImage(Object element) {
   BufferedImage image = null;
   if (element instanceof FeatureTypeStyleWrapper) {
     FeatureTypeStyleWrapper ftsW = (FeatureTypeStyleWrapper) element;
     List<RuleWrapper> rulesWrapperList = ftsW.getRulesWrapperList();
     image = rulesWrapperToImage(rulesWrapperList, 16, 16, type);
   } else if (element instanceof RuleWrapper) {
     RuleWrapper ruleWrapper = (RuleWrapper) element;
     image = rulesWrapperToImage(ruleWrapper, 16, 16, type);
   }
   if (image != null) {
     Image convertToSWTImage = AWTSWTImageUtils.convertToSWTImage(image);
     return convertToSWTImage;
   }
   return null;
 }