Package org.jfree.layouting.input.style.values

Examples of org.jfree.layouting.input.style.values.CSSConstant


    final ArrayList contentList = new ArrayList();
    while (parameters != null)
    {
      if (parameters.getLexicalUnitType() == LexicalUnit.SAC_IDENT)
      {
        contentList.add(new CSSConstant(parameters.getStringValue()));
      }
      else if (parameters.getLexicalUnitType() == LexicalUnit.SAC_STRING_VALUE)
      {
        contentList.add(new CSSStringValue(CSSStringType.STRING,
                parameters.getStringValue()));
View Full Code Here


    if (width != null)
    {
      unit = unit.getNextLexicalUnit();
    }

    final CSSConstant style;
    if (unit != null)
    {
      style = (CSSConstant) lookupValue(unit);
      if (style != null)
      {
View Full Code Here

    if (value instanceof CSSConstant == false)
    {
      // fine, we're done here ...
      return ;
    }
    final CSSConstant constant = (CSSConstant) value;
    final double parentFontSize =
            currentNode.getLayoutContext().getFontSpecification().getFontSize();
    if (RelativeFontSize.LARGER.equals(value))
    {
      final double scaleFactor = getScaleLargerFactor(parentFontSize);
View Full Code Here

    }
    if ("auto".equalsIgnoreCase(value.getStringValue()))
    {
      return CSSAutoValue.getInstance();
    }
    return new CSSConstant(value.getStringValue());
  }
View Full Code Here

   * @param unit
   * @return
   */
  public Map createValues(LexicalUnit unit)
  {
    final CSSConstant topStyle = (CSSConstant) lookupValue(unit);
    if (topStyle == null)
    {
      return null;
    }

    unit = unit.getNextLexicalUnit();

    final CSSConstant rightStyle;
    if (unit == null)
    {
      rightStyle = topStyle;
    }
    else
    {
      rightStyle = (CSSConstant) lookupValue(unit);
      if (rightStyle == null)
      {
        return null;
      }
      unit = unit.getNextLexicalUnit();
    }

    final CSSConstant bottomStyle;
    if (unit == null)
    {
      bottomStyle = topStyle;
    }
    else
    {
      bottomStyle = (CSSConstant) lookupValue(unit);
      if (bottomStyle == null)
      {
        return null;
      }
      unit = unit.getNextLexicalUnit();
    }

    final CSSConstant leftStyle;
    if (unit == null)
    {
      leftStyle = rightStyle;
    }
    else
View Full Code Here

                      final LayoutElement currentNode,
                      final StyleKey key)
  {
    final LayoutContext layoutContext = currentNode.getLayoutContext();
    final CSSValue value = layoutContext.getValue(key);
    final CSSConstant result;
    if (FontStretch.WIDER.equals(value))
    {
      // ask the parent ...
      final CSSConstant parentStretch = queryParent(currentNode.getParent());
      result = FontStretch.getByOrder(FontStretch.getOrder(parentStretch) + 1);
    }
    else if (FontStretch.NARROWER.equals(value))
    {
      // ask the parent ...
      final CSSConstant parentStretch = queryParent(currentNode.getParent());
      result = FontStretch.getByOrder(FontStretch.getOrder(parentStretch) - 1);
    }
    else if (value instanceof CSSConstant)
    {
      final CSSConstant stretch = (CSSConstant) lookupValue((CSSConstant) value);
      if (stretch != null)
      {
        result = stretch;
      }
      else
View Full Code Here

    if (width != null)
    {
      unit = unit.getNextLexicalUnit();
    }

    final CSSConstant style;
    if (unit != null)
    {
      style = (CSSConstant) lookupValue(unit);
      if (style != null)
      {
View Full Code Here

      if (value.getLexicalUnitType() != LexicalUnit.SAC_IDENT)
      {
        return null;
      }

      final CSSConstant horizontal;
      final CSSConstant vertical;

      final String horizontalString = value.getStringValue();
      if ("repeat-x".equalsIgnoreCase(horizontalString))
      {
        horizontal = BackgroundRepeat.REPEAT;
View Full Code Here

    if (value instanceof CSSConstant == false)
    {
      // fine, we're done here ...
      return;
    }
    final CSSConstant constant = (CSSConstant) value;
    final LayoutElement parent = currentNode.getParent();
    if (parent != null)
    {
      final double parentFontSize =
              parent.getLayoutContext().getFontSpecification().getFontSize();
View Full Code Here

      }
      layoutContext.setValue(PositioningStyleKeys.POSITION, Position.STATIC);
      return;
    }

    final CSSConstant value = (CSSConstant) resolveValue(process, currentNode, key);
    layoutContext.setValue(PositioningStyleKeys.POSITION, value);
    if (Position.ABSOLUTE.equals(value) ||
        Position.FIXED.equals(value))
    {
      // http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-float
View Full Code Here

TOP

Related Classes of org.jfree.layouting.input.style.values.CSSConstant

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.