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

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


        return getParentStyle().findCounter(name, must);
      }
      // must is called by counter-increment
      else if (must) {
        // the caller should do the other setting.
        ICounterValueGenerator counter = new CounterValueGenerator(
            name, null, null, this);
        counter.resetCount();
        counters.put(name, counter);
      }
    }
    return (ICounterValueGenerator) counters.get(name);
  }
View Full Code Here


   * (non-Javadoc)
   *
   * @see org.eclipse.jst.pagedesigner.css2.ICSSStyle#getStyleProperty(java.lang.String)
   */
  public Object getStyleProperty(String property) {
    ICSSPropertyMeta meta = CSSMetaRegistry.getInstance().getMeta(property);
    if (meta == null) {
      return ICSSPropertyMeta.NOT_SPECIFIED;
    }
        return meta.getInitialValue(property, this);
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.jst.pagedesigner.css2.ICSSStyle#getHTMLelementValue(java.lang.String)
   */
  public Object getHTMLelementInitValue(String propertyName) {
    ICSSPropertyMeta meta = CSSMetaRegistry.getInstance().getMeta(
        propertyName);
    if (meta == null) {
      return ICSSPropertyMeta.NOT_SPECIFIED;
    }
        return meta.getInitialValue(propertyName, this);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.eclipse.jst.pagedesigner.css2.ICSSStyle#getHTMLelementInitValue(java.lang.String)
   */
  public Object getHTMLelementInitValue(String propertyName) {
    ICSSPropertyMeta meta = getPropertyMeta(propertyName);
    if (meta != null) {
      Object obj = meta.getHTMLElementInitialValue(_element,
          getHTMLTag(), propertyName);
      if (obj == null) {
        obj = meta.getInitialValue(propertyName, this);
      }
      return obj;
    }
    return ICSSPropertyMeta.NOT_SPECIFIED;
  }
View Full Code Here

  /**
   * @param propertyName
   * @return the property
   */
  protected Object calculateProperty(String propertyName) {
    ICSSPropertyMeta meta = getPropertyMeta(propertyName);
    Object result = null;
    // get declaration
    CSSStyleDeclaration decl = getDeclaration();
    CSSValue value = decl == null ? null : decl
        .getPropertyCSSValue(propertyName);
    if (value == null) {
      if (meta != null) {
        result = meta.calculateHTMLAttributeOverride(_element,
            getHTMLTag(), propertyName, this);
        if (result != null) {
          return result;
        }
      }
      decl = getDefaultDeclaration();
    }
    value = decl == null ? null : decl.getPropertyCSSValue(propertyName);

    if (value != null && value.getCssValueType() == CSSValue.CSS_INHERIT) {
      result = getParentResultValue(meta, propertyName);
    } else if (value == null) {
      if (meta != null) {
        result = meta.calculateHTMLAttributeOverride(_element,
            getHTMLTag(), propertyName, this);
      }
      if (result == null) {
        result = calculateLocalOverride(meta, propertyName);
      }
      if (result == null) {
        if (meta == null) {
          result = ICSSPropertyMeta.NOT_SPECIFIED;
        } else {
          if (meta.isInherited()) {
            result = getParentResultValue(meta, propertyName);
          } else {
            result = meta.getInitialValue(propertyName, this);
          }
        }
      }
    } else {
      result = calculateCSSValueResult(meta, value, propertyName);
View Full Code Here

    int suggestedWith = _blockBox.getContentWidth();
    int suggestedHeight = _blockBox.getContentHeight();
    // int suggestedWith = getSuggestedWidth(line, style, provider);
    // int suggestedHeight = getSuggestedHeight(line, style, provider);

    DimensionInfo resultInfo = provider.getPreferredDimension(
        suggestedWith, suggestedHeight);
    Dimension resultSize = resultInfo.getDimension();

    _widgetBox = new WidgetBox(); // ((CSSWidgetFigure)getFlowFigure()).getWidgetBox();
    // if (provider.isHandlingBorder() || style == null)
    // {
    _widgetBox.setWidth(resultSize.width);
    _widgetBox.setHeight(resultSize.height);
    _widgetBox.setAscent(resultInfo.getAscent());
    // }
    // else
    // {
    // widgetBox.setWidth(resultSize.width +
    // style.getBorderInsets().getWidth());
View Full Code Here

    }
    if (height <= 0) {
      height = getDefaultHeight();
    }
    return new DimensionInfo(width, height, -1);
  }
View Full Code Here

      width = getDefaultWidth();
    }
    if (height <= 0) {
      height = getDefaultHeight();
    }
    return new DimensionInfo(width, height, -1);
  }
View Full Code Here

      width = getDefaultWidth();
    }
    if (height <= 0) {
      height = getDefaultHeight();
    }
    return new DimensionInfo(width, height, -1);
  }
View Full Code Here

      if (data.trim().length() == 0) {
        return;
      }
      // XXX: currently creating of CSSTextFigure is distributed both here
      // and TextEditPart. We may want to unify them later.
      CSSTextFigure figure = new CSSTextFigure(new ICSSTextProvider() {
        /*
         * (non-Javadoc)
         *
         * @see org.eclipse.jst.pagedesigner.css2.provider.ICSSTextProvider#getCSSStyle()
         */
 
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.