Examples of FontStyle


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

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

    // 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

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

    }
  }

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

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

  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

Examples of org.locationtech.udig.mapgraphic.style.FontStyle

        if (locationStyle == null) {
            locationStyle = new Rectangle(-1, -1, -1, -1);
            blackboard.put(LocationStyleContent.ID, locationStyle);
        }

        FontStyle fontStyle = (FontStyle) blackboard.get(FontStyleContent.ID);
        if (fontStyle == null) {
            fontStyle = new FontStyle();
            blackboard.put(FontStyleContent.ID, fontStyle);
        }

        this.backgroundColour = legendStyle.backgroundColor;
        this.foregroundColour = legendStyle.foregroundColor;
        this.fontColour = legendStyle.fontColor;
        this.isRounded = legendStyle.isRoundedRectangle;
        this.horizontalMargin = 5;
        this.verticalMargin = 5;
        this.horizontalSpacing = 3;
        this.verticalSpacing = 3;
        this.indentSize = 5;
        this.boxHeight = legendStyle.boxWidth;
        this.boxWidth = legendStyle.boxWidth;

        this.maxHeight = legendStyle.legendHeight;
        this.maxWidth = legendStyle.legendWidth;

        locationStyle.x = legendStyle.xPos;
        locationStyle.y = legendStyle.yPos;

        final ViewportGraphics graphics = context.getGraphics();
        GC gc = graphics.getGraphics(GC.class);
        if (gc != null) {
            gc.setAntialias(SWT.ON);
        }

        final int rowHeight = Math.max(boxHeight, graphics.getFontHeight()); // space allocated to
        // each layer
        Font oldFont = fontStyle.getFont();

        int fontHeight = rowHeight < 12 ? 8 : rowHeight - 8;
        Font font = new Font(oldFont.getName(), fontStyle.getFont().getStyle(), fontHeight);
        if (font != null) {
            graphics.setFont(font);
        } else {
            graphics.setFont(fontStyle.getFont());
        }

        List<Map<ILayer, FeatureTypeStyle[]>> layers = new ArrayList<Map<ILayer, FeatureTypeStyle[]>>();

        int longestRow = 0; // used to calculate the width of the graphic
View Full Code Here

Examples of org.odftoolkit.simple.style.StyleTypeDefinitions.FontStyle

    String fontFamilyName = font.getFamilyName();
    if (fontFamilyName == null) {
      fontFamilyName = "Times New Roman";
    }
    int fontStyleNum = java.awt.Font.PLAIN;
    FontStyle fontStyle = font.getFontStyle();
    if (fontStyle != null) {
      switch (fontStyle) {
      case BOLD:
        fontStyleNum = java.awt.Font.BOLD;
        break;
View Full Code Here

Examples of org.zkoss.zss.model.FontStyle

      if (striketThrough) {
        sb.append("text-decoration:").append("line-through;");
      }

      FontStyle fontStyle = format.getFontStyle();
      if (fontStyle != null) {
        if (fontStyle.equals(FontStyle.BOLDITALIC)) {
          sb.append("font-weight:").append("bold;");
          sb.append("font-style:").append("italic;");
        } else if (fontStyle.equals(FontStyle.ITALIC)) {
          sb.append("font-style:").append("italic;");
        } else if (fontStyle.equals(FontStyle.BOLD)) {
          sb.append("font-weight:").append("bold;");
        }
      }

      int fontSize = format.getFontSize();
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.