Examples of CSSValue


Examples of org.pentaho.reporting.libraries.css.values.CSSValue

   */
  public Map createValues(LexicalUnit unit)
  {
    // todo we ignore the font-family system font styles for now.

    CSSValue fontStyle = styleReadHandler.createValue(null, unit);
    if (fontStyle != null)
    {
      unit = unit.getNextLexicalUnit();
      if (unit == null)
      {
        return null;
      }
    }
    CSSValue fontVariant = variantReadHandler.createValue(null, unit);
    if (fontVariant != null)
    {
      unit = unit.getNextLexicalUnit();
      if (unit == null)
      {
        return null;
      }
    }
    CSSValue fontWeight = weightReadHandler.createValue(null, unit);
    if (fontWeight != null)
    {
      unit = unit.getNextLexicalUnit();
      if (unit == null)
      {
        return null;
      }
    }

    CSSValue fontSize = sizeReadHandler.createValue(null, unit);
    if (fontSize == null)
    {
      return null; // required value is missing
    }

    unit = unit.getNextLexicalUnit();
    if (unit == null)
    {
      return null; // font family missing
    }

    CSSValue lineHeight = null;
    if (unit.getLexicalUnitType() == LexicalUnit.SAC_OPERATOR_SLASH)
    {
      unit = unit.getNextLexicalUnit();
      if (unit == null)
      {
        return null;
      }

      lineHeight = lineHeightReadHandler.createValue(null, unit);
      if (lineHeight == null)
      {
        return null; // required sequence missing
      }
      unit = unit.getNextLexicalUnit();
      if (unit == null)
      {
        return null;
      }
    }

    CSSValue fontFamily = fontFamilyReadHandler.createValue(null, unit);
    if (fontFamily == null)
    {
      return null; // font family is required!
    }

View Full Code Here

Examples of org.pentaho.reporting.libraries.css.values.CSSValue

    map.put(TextStyleKeys.TEXT_OVERLINE_STYLE, TextDecorationStyle.NONE);
    map.put(TextStyleKeys.TEXT_LINE_THROUGH_STYLE, TextDecorationStyle.NONE);

    while (unit != null)
    {
      CSSValue constant = lookupValue(unit);
      if (constant == null)
      {
        return null;
      }
      if (constant.getCSSText().equals("none"))
      {
        map.put(TextStyleKeys.TEXT_UNDERLINE_STYLE, TextDecorationStyle.NONE);
        map.put(TextStyleKeys.TEXT_OVERLINE_STYLE, TextDecorationStyle.NONE);
        map.put(TextStyleKeys.TEXT_LINE_THROUGH_STYLE, TextDecorationStyle.NONE);
        return map;
      }
      if (constant.getCSSText().equals("blink"))
      {
        map.put(TextStyleKeys.TEXT_BLINK, new CSSConstant("blink"));
      }
      else if (constant.getCSSText().equals("underline"))
      {
        map.put(TextStyleKeys.TEXT_UNDERLINE_STYLE, TextDecorationStyle.SOLID);
      }
      else if (constant.getCSSText().equals("overline"))
      {
        map.put(TextStyleKeys.TEXT_OVERLINE_STYLE, TextDecorationStyle.SOLID);
      }
      else if (constant.getCSSText().equals("line-through"))
      {
        map.put(TextStyleKeys.TEXT_LINE_THROUGH_STYLE, TextDecorationStyle.SOLID);
      }
      unit = unit.getNextLexicalUnit();
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.values.CSSValue

   * @param unit
   * @return
   */
  public Map createValues(LexicalUnit unit)
  {
    final CSSValue width = widthReadHandler.parseWidth(unit);
    if (width != null)
    {
      unit = unit.getNextLexicalUnit();
    }

    final CSSConstant style;
    if (unit != null)
    {
      style = (CSSConstant) lookupValue(unit);
      if (style != null)
      {
        unit = unit.getNextLexicalUnit();
      }
    }
    else
    {
      style = null;
    }

    final CSSValue color;
    if (unit != null)
    {
      color = ColorReadHandler.createColorValue(unit);
    }
    else
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.values.CSSValue

   * @param unit
   * @return
   */
  public Map createValues(LexicalUnit unit)
  {
    final CSSValue width = widthReadHandler.parseWidth(unit);
    if (width != null)
    {
      unit = unit.getNextLexicalUnit();
    }

    final CSSConstant style;
    if (unit != null)
    {
      style = (CSSConstant) lookupValue(unit);
      if (style != null)
      {
        unit = unit.getNextLexicalUnit();
      }
    }
    else
    {
      style = null;
    }

    final CSSValue color;
    if (unit != null)
    {
      color = ColorReadHandler.createColorValue(unit);
    }
    else
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.values.CSSValue

      {
        return CSSAutoValue.getInstance();
      }
    }

    final CSSValue firstPosition = parseFirstPosition(value);
    if (firstPosition == null)
    {
      return null;
    }

    value = value.getNextLexicalUnit();
    final CSSValue secondPosition = parseSecondPosition(value, firstPosition);
    if (secondPosition == null)
    {
      return null;
    }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.values.CSSValue

   * @param unit
   * @return
   */
  public Map createValues(LexicalUnit unit)
  {
    CSSValue nameValue = nameReadHandler.createValue(null, unit);
    if (nameValue != null)
    {
      unit = unit.getNextLexicalUnit();
    }

    CSSValue newValue = null;
    if (unit != null)
    {
      newValue = newReadHandler.createValue(null, unit);
      if (newValue != null)
      {
        unit = unit.getNextLexicalUnit();
      }
    }
    CSSValue positionValue = null;
    if (unit != null)
    {
      positionValue = positionReadHandler.createValue(null, unit);
    }

View Full Code Here

Examples of org.pentaho.reporting.libraries.css.values.CSSValue

   * @param unit
   * @return
   */
  public Map createValues(LexicalUnit unit)
  {
    final CSSValue width = CSSValueFactory.createLengthValue(unit);
    if (width != null)
    {
      unit = unit.getNextLexicalUnit();
    }

    final CSSConstant style;
    if (unit != null)
    {
      style = (CSSConstant) lookupValue(unit);
      if (style != null)
      {
        unit = unit.getNextLexicalUnit();
      }
    }
    else
    {
      style = null;
    }

    final CSSValue color;
    if (unit != null)
    {
      color = ColorReadHandler.createColorValue(unit);
    }
    else
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.values.CSSValue

   * @param unit
   * @return
   */
  public Map createValues(LexicalUnit unit)
  {
    final CSSValue topWidth = parseWidth(unit);
    if (topWidth == null)
    {
      return null;
    }

    unit = unit.getNextLexicalUnit();

    final CSSValue rightWidth;
    if (unit == null)
    {
      rightWidth = topWidth;
    }
    else
    {
      rightWidth = parseWidth(unit);
      if (rightWidth == null)
      {
        return null;
      }
      unit = unit.getNextLexicalUnit();
    }

    final CSSValue bottomWidth;
    if (unit == null)
    {
      bottomWidth = topWidth;
    }
    else
    {
      bottomWidth = parseWidth(unit);
      if (bottomWidth == null)
      {
        return null;
      }
      unit = unit.getNextLexicalUnit();
    }

    final CSSValue leftWidth;
    if (unit == null)
    {
      leftWidth = rightWidth;
    }
    else
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.values.CSSValue

   * @param unit
   * @return
   */
  public Map createValues(LexicalUnit unit)
  {
    final CSSValue topColor = ColorReadHandler.createColorValue(unit);
    if (topColor == null)
    {
      return null;
    }

    unit = unit.getNextLexicalUnit();

    final CSSValue rightColor;
    if (unit == null)
    {
      rightColor = topColor;
    }
    else
    {
      rightColor = ColorReadHandler.createColorValue(unit);
      if (rightColor == null)
      {
        return null;
      }
      unit = unit.getNextLexicalUnit();
    }

    final CSSValue bottomColor;
    if (unit == null)
    {
      bottomColor = topColor;
    }
    else
    {
      bottomColor = ColorReadHandler.createColorValue(unit);
      if (bottomColor == null)
      {
        return null;
      }
      unit = unit.getNextLexicalUnit();
    }

    final CSSValue leftColor;
    if (unit == null)
    {
      leftColor = rightColor;
    }
    else
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.values.CSSValue

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

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.