Package org.geomajas.gwt.client.gfx.style

Examples of org.geomajas.gwt.client.gfx.style.FontStyle


    IButton button4 = new IButton(I18nProvider.getSampleMessages().renderingDrawText());
    button4.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        map.getVectorContext().drawGroup(map.getGroup(RenderGroup.SCREEN), group1);
        FontStyle style = new FontStyle("#FF0000", 12, "Verdana", "normal", "normal");
        map.getVectorContext()
            .drawText(group1, "text", "This is some text...", new Coordinate(100, 120), style);
      }
    });
    button4.setWidth100();
View Full Code Here


    // Create the needed groups in the correct order:
    context.getVectorContext().drawGroup(mapWidget.getGroup(RenderGroup.VECTOR), layer); // layer.getDefaultStyle???
    context.getVectorContext().drawGroup(layer, layer.getFeatureGroup());
    context.getVectorContext().drawGroup(layer, layer.getSelectionGroup());
    FontStyle labelStyle = getLabelFontstyle(layer);
    context.getVectorContext().drawGroup(layer, layer.getLabelGroup(), labelStyle);

    // Create the needed groups in the correct order:
    context.getRasterContext().drawGroup(mapWidget.getGroup(RenderGroup.RASTER), layer); // layer.getDefaultStyle???
View Full Code Here

    }
  }

  private FontStyle getLabelFontstyle(VectorLayer layer) {
    FontStyleInfo info = layer.getLayerInfo().getNamedStyleInfo().getLabelStyle().getFontStyle();
    return new FontStyle(info);
  }
View Full Code Here

  public static void applyStyle(Element element, Style style) {
    if (style != null && element != null) {
      if (style instanceof ShapeStyle) {
        applyShapeStyle(element, (ShapeStyle) style);
      } else if (style instanceof FontStyle) {
        FontStyle fontStyle = (FontStyle) style;
        element.getStyle().setProperty("fontSize", "" + fontStyle.getFontSize());
        element.getStyle().setProperty("color", fontStyle.getFillColor());
        element.getStyle().setProperty("fontFamily", fontStyle.getFontFamily());
        element.getStyle().setProperty("fontWeight", fontStyle.getFontWeight());
        element.getStyle().setProperty("fontStyle", fontStyle.getFontStyle());
      } else if (style instanceof PictureStyle) {
        PictureStyle picturStyle = (PictureStyle) style;
        if (SC.isIE()) { //TODO: it's a VML decoder, why make this check?
          element.getStyle().setProperty("filter", "alpha(opacity=" + 100 * picturStyle.getOpacity() + ")");
        } else {
View Full Code Here

TOP

Related Classes of org.geomajas.gwt.client.gfx.style.FontStyle

Copyright © 2018 www.massapicom. 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.