Examples of ICSSFont


Examples of org.eclipse.jst.pagedesigner.css2.font.ICSSFont

  private int getDefaultHeight() {
    ICSSStyle style = this.getCSSStyle();
    if (style == null) {
      style = DefaultStyle.getInstance();
    }
    ICSSFont font = style.getCSSFont();
    Font swtfont = font.getSwtFont();
    int fontSize = FigureUtilities.getFontMetrics(swtfont).getHeight();
    return fontSize + VERTICAL_INCREMENT;
  }
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.css2.font.ICSSFont

    if (_options != null) {
      ICSSStyle style = this.getCSSStyle();
      if (style == null) {
        style = DefaultStyle.getInstance();
      }
      ICSSFont font = style.getCSSFont();
      Font swtFont = font.getSwtFont();
      for (int i = 0; i < _options.length; i++) {
        int width = FigureUtilities.getTextWidth(_options[i], swtFont);
        if (width > longestStringWidth) {
          longestStringWidth = width;
        }
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.css2.font.ICSSFont

  public int getDefaultHeight() {
    ICSSStyle style = this.getCSSStyle();
    if (style == null) {
      style = DefaultStyle.getInstance();
    }
    ICSSFont font = style.getCSSFont();
    Font swtfont = font.getSwtFont();
    int fontHeight = FigureUtilities.getFontMetrics(swtfont).getHeight();
    return (fontHeight) * _rows + VERTICAL_PADDING;
  }
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.css2.font.ICSSFont

    if (_options != null) {
      ICSSStyle style = this.getCSSStyle();
      if (style == null) {
        style = DefaultStyle.getInstance();
      }
      ICSSFont font = style.getCSSFont();
      Font swtfont = font.getSwtFont();
      g.setFont(swtfont);

      Color newColor = null;
      Object color = style.getColor();
      if (color instanceof Color) {
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.css2.font.ICSSFont

  private int getDefaultHeight() {
    ICSSStyle style = this.getCSSStyle();
    if (style == null) {
      style = DefaultStyle.getInstance();
    }
    ICSSFont font = style.getCSSFont();
    Font swtfont = font.getSwtFont();
    int fontHeight = FigureUtilities.getFontMetrics(swtfont).getHeight();

    return (fontHeight) * _rows + VERTICAL_PADDING;
  }
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.css2.font.ICSSFont

  private int getDefaultWidth() {
    ICSSStyle style = this.getCSSStyle();
    if (style == null) {
      style = DefaultStyle.getInstance();
    }
    ICSSFont font = style.getCSSFont();

    int fontWidth = FigureUtilities.getFontMetrics(font.getSwtFont())
        .getAverageCharWidth();
    return _columns * fontWidth + ARRAWWIDTH + HORIZONTAL_PADDING;
  }
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.css2.font.ICSSFont

        style = DefaultStyle.getInstance();
      }
      int decoration = ((Integer) style
          .getStyleProperty(ICSSPropertyID.ATTR_TEXTDECORATION))
          .intValue();
      ICSSFont font = style.getCSSFont();
      g.setFont(font.getSwtFont());

      Color newColor = null;
      Object color = style.getColor();
      if (color instanceof Color) {
        g.setForegroundColor((Color) color);
      } else if (color instanceof RGB) {
        newColor = new Color(Display.getCurrent(), (RGB) color);
        g.setForegroundColor(newColor);
      } else {
        g.setForegroundColor(ColorConstants.black);
      }

      Object textAlign = style
          .getStyleProperty(ICSSPropertyID.ATTR_TEXTALIGN);
      int begin = 0;
      int end = 0;
      int fontHeight = FigureUtilities.getFontMetrics(font.getSwtFont())
          .getHeight();

      int fontWidth = FigureUtilities.getFontMetrics(font.getSwtFont())
          .getAverageCharWidth();
      int columns = (rect.width - HORIZONTAL_PADDING) / fontWidth;

      int i = 0;
      while (true) {
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.css2.font.ICSSFont

    } else {
      ICSSStyle style = this.getCSSStyle();
      if (style == null) {
        style = DefaultStyle.getInstance();
      }
      ICSSFont font = style.getCSSFont();

      textareaWidth = FigureUtilities.getTextWidth(_longestString, font
          .getSwtFont());
    }
    return textareaWidth + ARRAWWIDTH + HORIZONTAL_PADDING;
  }
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.css2.font.ICSSFont

  public int getDefaultHeight() {
    ICSSStyle style = this.getCSSStyle();
    if (style == null) {
      style = DefaultStyle.getInstance();
    }
    ICSSFont font = style.getCSSFont();
    Font swtfont = font.getSwtFont();
    int fontSize = FigureUtilities.getFontMetrics(swtfont).getHeight();
    return fontSize + VERTICAL_PADDING;
  }
View Full Code Here

Examples of org.eclipse.jst.pagedesigner.css2.font.ICSSFont

    if (this._firstString != null) {
      ICSSStyle style = this.getCSSStyle();
      if (style == null) {
        style = DefaultStyle.getInstance();
      }
      ICSSFont font = style.getCSSFont();
      g.setFont(font.getSwtFont());

      Color newColor = null;
      Object color = style.getColor();
      if (color instanceof Color) {
        g.setForegroundColor((Color) color);
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.