Examples of FontStyleInfo


Examples of org.geomajas.configuration.FontStyleInfo

    mapRasterizingInfo.setBounds(GeometryConverter.toDto(map.getMapModel().getMapView().getBounds()));
    mapRasterizingInfo.setScale(mapView.getCurrentScale());
    mapRasterizingInfo.setTransparent(true);
    LegendRasterizingInfo legendRasterizingInfo = new LegendRasterizingInfo();
    legendRasterizingInfo.setTitle("Legend");
    FontStyleInfo font = new FontStyleInfo();
    font.applyDefaults();
    legendRasterizingInfo.setFont(font);
    mapRasterizingInfo.setLegendRasterizingInfo(legendRasterizingInfo);
    mapInfo.getWidgetInfo().put(MapRasterizingInfo.WIDGET_KEY, mapRasterizingInfo);
    for (Layer<?> layer : map.getMapModel().getLayers()) {
      if (layer instanceof VectorLayer) {
View Full Code Here

Examples of org.geomajas.configuration.FontStyleInfo

  }

  @Override
  protected LegendComponentInfo buildLegend() {
    LegendComponentInfo legend = super.buildLegend();
    FontStyleInfo style = new FontStyleInfo();
    style.setFamily("Dialog");
    style.setStyle("Italic");
    style.setSize(14);
    legend.setFont(style);
    legend.setMapId(mapModel.getMapInfo().getId());
    legend.setTag("legend");
    for (Layer layer : mapModel.getLayers()) {
      if (layer instanceof VectorLayer && layer.isShowing()) {
View Full Code Here

Examples of org.geomajas.configuration.FontStyleInfo

    return scaleBar;
  }

  protected LabelComponentInfo buildTitle() {
    LabelComponentInfo label = new LabelComponentInfo();
    FontStyleInfo style = new FontStyleInfo();
    style.setFamily("Dialog");
    style.setStyle("Italic");
    style.setSize(14);
    label.setFont(style);
    label.setBackgroundColor("0xFFFFFF");
    label.setBorderColor("0x000000");
    label.setFontColor("0x000000");
    label.getLayoutConstraint().setAlignmentY(LayoutConstraintInfo.TOP);
View Full Code Here

Examples of org.geomajas.configuration.FontStyleInfo

  private TextSymbolizer createTextSymbolizer(LabelStyleInfo labelStyle, LayerType layerType) {
    Fill fontFill = styleBuilder.createFill(styleBuilder.literalExpression(labelStyle.getFontStyle().getColor()),
        styleBuilder.literalExpression(labelStyle.getFontStyle().getOpacity()));
    TextSymbolizer symbolizer = styleBuilder.createTextSymbolizer();
    symbolizer.setFill(fontFill);
    FontStyleInfo fontInfo = labelStyle.getFontStyle();
    symbolizer.setFont(styleBuilder.createFont(styleBuilder.literalExpression(fontInfo.getFamily()),
        styleBuilder.literalExpression(fontInfo.getStyle()),
        styleBuilder.literalExpression(fontInfo.getWeight()),
        styleBuilder.literalExpression(fontInfo.getSize())));
    symbolizer.setLabel(styleBuilder.attributeExpression(labelStyle.getLabelAttributeName()));
    Fill haloFill = styleBuilder.createFill(
        styleBuilder.literalExpression(labelStyle.getBackgroundStyle().getFillColor()),
        styleBuilder.literalExpression(labelStyle.getBackgroundStyle().getFillOpacity()));
    symbolizer.setHalo(styleBuilder.createHalo(haloFill, 1));
View Full Code Here

Examples of org.geomajas.configuration.FontStyleInfo

    lr3.setStyle(layerBeansMultiLineStyleInfo);
    cl3.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr3);
    mapInfo.getLayers().add(cl3);

    LegendRasterizingInfo legendRasterizingInfo = new LegendRasterizingInfo();
    legendRasterizingInfo.setFont(new FontStyleInfo());
    legendRasterizingInfo.getFont().applyDefaults();
    legendRasterizingInfo.getFont().setSize(12);
    legendRasterizingInfo.getFont().setFamily("courier");
    legendRasterizingInfo.setTitle("legend");
    mapRasterizingInfo.setLegendRasterizingInfo(legendRasterizingInfo);
View Full Code Here

Examples of org.geomajas.configuration.FontStyleInfo

    lr3.setStyle(layerBeansMultiLineStyleInfo);
    cl3.getWidgetInfo().put(VectorLayerRasterizingInfo.WIDGET_KEY, lr3);
    mapInfo.getLayers().add(cl3);

    LegendRasterizingInfo legendRasterizingInfo = new LegendRasterizingInfo();
    legendRasterizingInfo.setFont(new FontStyleInfo());
    legendRasterizingInfo.getFont().applyDefaults();
    legendRasterizingInfo.getFont().setSize(12);
    legendRasterizingInfo.getFont().setFamily("courier");
    legendRasterizingInfo.setTitle("legend");
    mapRasterizingInfo.setLegendRasterizingInfo(legendRasterizingInfo);
View Full Code Here

Examples of org.geomajas.configuration.FontStyleInfo

  }

  @Test
  public void testRenderLegend() throws Exception {
    LegendComponentInfo legend = new LegendComponentInfo();
    FontStyleInfo style = new FontStyleInfo();
    style.setFamily("Dialog");
    style.setStyle("Italic");
    style.setSize(12);
    legend.setFont(style);
    legend.setMapId("mainMap");
    legend.setTag("legend");
    legend.setTitle("legend");
    for (ClientLayerInfo layer : configurationService.getMapInfo("mainMap", "application").getLayers()) {
View Full Code Here

Examples of org.geomajas.configuration.FontStyleInfo

    getLayoutConstraint().setAlignmentX(LayoutConstraintInfo.LEFT);
    getLayoutConstraint().setAlignmentY(LayoutConstraintInfo.BOTTOM);
    getLayoutConstraint().setMarginX(20);
    getLayoutConstraint().setMarginY(20);
    getLayoutConstraint().setWidth(200);
    font = new FontStyleInfo();
    font.setFamily("Dialog");
    font.setStyle("Plain");
    font.setSize(10);
  }
View Full Code Here

Examples of org.geomajas.configuration.FontStyleInfo

    getLayoutConstraint().setAlignmentX(LayoutConstraintInfo.RIGHT);
    getLayoutConstraint().setAlignmentY(LayoutConstraintInfo.BOTTOM);
    getLayoutConstraint().setFlowDirection(LayoutConstraintInfo.FLOW_Y);
    getLayoutConstraint().setMarginX(20);
    getLayoutConstraint().setMarginY(20);
    font = new FontStyleInfo();
    font.setFamily("Dialog");
    font.setStyle("Plain");
    font.setSize(12);
  }
View Full Code Here

Examples of org.geomajas.configuration.FontStyleInfo

      }
    }
  }

  private FontStyleInfo convertFont(FontInfo font) {
    FontStyleInfo fontStyle = new FontStyleInfo();
    if (font == null) {
      fontStyle.applyDefaults();
    } else {
      Map<String, String> cssMap = getLiteralMap(font.getCssParameterList());
      fontStyle.setFamily(cssMap.get("font-family"));
      if (cssMap.containsKey("font-size")) {
        fontStyle.setSize(Integer.parseInt(cssMap.get("font-size")));
      }
      fontStyle.setStyle(cssMap.get("font-style"));
      fontStyle.setWeight(cssMap.get("font-weight"));
    }
    return fontStyle;
  }
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.