Package org.eclipse.jst.pagedesigner.css2.property

Examples of org.eclipse.jst.pagedesigner.css2.property.CounterResetMeta


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

    // browsebutton.setValue("Browse...");
    // CompositeWidgetProvider provider = new
    // CompositeWidgetProvider(getCSSStyle(), textprovider, browsebutton,
    // false);
    // return provider;
    ICSSWidgetProvider textprovider = getTextInputProvider(node);
    // XXX: should we use the defaultstyle for the button?
    ButtonWidgetProvider browsebutton = new ButtonWidgetProvider(
        getCSSStyle(node));
    browsebutton.setValue(Messages.InputFigureHandler_Browse);
    InputFileWidgetProvider provider = new InputFileWidgetProvider(
View Full Code Here

    super();
  }

  public void updateFigure(Element node, CSSFigure oldFigure) {
    setCurrentFigure(oldFigure);
    ICSSWidgetProvider provider = initializeWidgetProvider(node);
    oldFigure.setCSSStyle(provider.getCSSStyle());
    oldFigure
        .setFixedLayoutManager(new CSSWidgetLayout(oldFigure, provider));
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.jst.pagedesigner.css2.layout.CSSBlockFlowLayout#isInlineBlock()
   */
  public boolean isInlineBlock() {
    ICSSWidgetProvider provider = getProvider();
    return provider.isInline();
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.jst.pagedesigner.css2.layout.FlowFigureLayout#layout()
   */
  protected void layoutChildren() {
    ICSSWidgetProvider provider = getProvider();

    // if we did endLine, then will result in context create a new line, so
    // we may in the new line now.
    // passing in the top margin, and context will consider that when
    // creating the new line.

    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)
View Full Code Here

TOP

Related Classes of org.eclipse.jst.pagedesigner.css2.property.CounterResetMeta

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.