Package org.eclipse.jst.pagedesigner.css2.style

Examples of org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo


   *
   * @return the default height
   * @see TextInputWidgetProvider#getDefaultHeight()
   */
  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


   */
  public void paintFigure(Graphics g, Rectangle rect) {
    BorderUtil.drawBorder(g, rect.x, rect.y, rect.width, rect.height,
        BORDERTHICK, true);
    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) {
        g.setForegroundColor((Color) color);
      } else if (color instanceof RGB) {
        newColor = new Color(Display.getCurrent(), (RGB) color);
        g.setForegroundColor(newColor);
View Full Code Here

  /**
   * @return
   */
  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

  /**
   * @return
   */
  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

   *      org.eclipse.draw2d.geometry.Rectangle)
   */
  public void paintFigure(Graphics g, Rectangle rect) {
    if (_value != null) {
      g.clipRect(rect);
      ICSSStyle style = this.getCSSStyle();
      if (style == null) {
        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();
View Full Code Here

   *      int)
   */
  public DimensionInfo getPreferredDimension(int width, int height) {
    Insets borderInset = new Insets();
    Insets borderPaddingInset = new Insets();
    ICSSStyle style = getCSSStyle();
    if (style != null) {
      borderInset = style.getBorderInsets();
      borderPaddingInset = borderInset.getAdded(style.getPaddingInsets());
    }

    Dimension d1 = _sub1.getPreferredDimension(-1, -1).getDimension();
    Dimension d2 = _sub2.getPreferredDimension(-1, -1).getDimension();

View Full Code Here

    Rectangle rect1, rect2;

    Insets borderInset = new Insets();
    Insets paddingInset = new Insets();
    Insets borderPaddingInset = new Insets();
    ICSSStyle style = getCSSStyle();
    if (style != null) {
      borderInset = style.getBorderInsets();
      paddingInset = style.getPaddingInsets();
      borderPaddingInset.add(borderInset).add(paddingInset);
    }

    Dimension d1 = _sub1.getPreferredDimension(-1, -1).getDimension();
    Dimension d2 = _sub2.getPreferredDimension(-1, -1).getDimension();
View Full Code Here

  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

    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

  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

TOP

Related Classes of org.eclipse.jst.pagedesigner.css2.style.ITagEditInfo

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.