Examples of LabelComponentImpl


Examples of org.geomajas.plugin.printing.component.impl.LabelComponentImpl

    page.setSize(pageSize, landscape);
    page.setTag(PrintTemplate.PAGE);
    MapComponentImpl map = createMap();
    ImageComponentImpl northarrow = createArrow();
    ScaleBarComponentImpl bar = createBar();
    LabelComponentImpl title = createTitle();

    LegendComponentImpl legend = new LegendComponentImpl();
    legend.setTag(PrintTemplate.LEGEND);
    map.addComponent(bar);
    map.addComponent(legend);
View Full Code Here

Examples of org.geomajas.plugin.printing.component.impl.LabelComponentImpl

    northarrow.setTag(PrintTemplate.ARROW);
    return northarrow;
  }

  private LabelComponentImpl createTitle() {
    LabelComponentImpl title = createInstance(LabelComponentImpl.class);
    title.setFont(new Font("Dialog", Font.ITALIC, 14));
    title.setBackgroundColor(Color.white);
    title.setBorderColor(Color.BLACK);
    title.setFontColor(Color.BLACK);
    title.setText("<Title>");
    title.getConstraint().setAlignmentY(LayoutConstraintInfo.TOP);
    title.getConstraint().setAlignmentX(LayoutConstraintInfo.CENTER);
    title.getConstraint().setMarginY(40);
    title.setTag(PrintTemplate.TITLE);
    return title;
  }
View Full Code Here

Examples of org.geomajas.plugin.printing.component.impl.LabelComponentImpl

    PageComponent page = (PageComponent) converterService.toInternal(template.getPage());
    MapComponentImpl mapComponent = (MapComponentImpl) page.getChild(PrintTemplate.MAP);
    if (mapComponent != null) {
      LegendComponentImpl legendComponent = (LegendComponentImpl) mapComponent.getChild(PrintTemplate.LEGEND);
      if (legendComponent != null) {
        LabelComponentImpl lab = (LabelComponentImpl) legendComponent.getChild(PrintTemplate.TITLE);
        if (lab != null) {
          lab.setText(legendComponent.getTitle());
        }
        // need to do this before setSizeAndFit
        adjustLegendFontSizeForSmallPageSizes(request, legendComponent);
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.