Examples of CSSNumericValue


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

    {
      if (value == null)
      {
        return null;
      }
      CSSNumericValue nval = CSSValueFactory.createLengthValue(value);
      if (nval != null)
      {
        list[index] = nval;
      }
      else if (value.getLexicalUnitType() == LexicalUnit.SAC_PERCENTAGE)
View Full Code Here

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

  {
  }

  public CSSValue createValue(StyleKey name, LexicalUnit value)
  {
    CSSNumericValue firstValue = CSSValueFactory.createLengthValue(value);
    if (firstValue == null)
    {
      return null;
    }
    value = value.getNextLexicalUnit();
    CSSNumericValue secondValue;
    if (value == null)
    {
      secondValue = firstValue;
    }
    else
View Full Code Here

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

            CSSNumericValue.createPtValue(ps.getHeight()));
      }
    }
    else
    {
      final CSSNumericValue horizontalWidth = (CSSNumericValue) parseWidth(value);
      if (horizontalWidth == null)
      {
        return null;
      }

      value = value.getNextLexicalUnit();

      final CSSNumericValue verticalWidth;
      if (value == null)
      {
        verticalWidth = horizontalWidth;
      }
      else
View Full Code Here

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

  {
  }

  public CSSValue createValue(StyleKey name, LexicalUnit value)
  {
    CSSNumericValue firstValue = CSSValueFactory.createLengthValue(value);
    if (firstValue == null)
    {
      return null;
    }
    value = value.getNextLexicalUnit();
    CSSNumericValue secondValue;
    if (value == null)
    {
      secondValue = firstValue;
    }
    else
View Full Code Here

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

    {
      if (value == null)
      {
        return null;
      }
      CSSNumericValue nval = CSSValueFactory.createLengthValue(value);
      if (nval != null)
      {
        list[index] = nval;
      }
      else if (value.getLexicalUnitType() == LexicalUnit.SAC_PERCENTAGE)
View Full Code Here

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

  {
    if (CSSNumericType.NUMBER.equals(value.getType()) == false)
    {
      return false;
    }
    CSSNumericValue nvalue = (CSSNumericValue) value;
    return nvalue.getValue() >= 700;
  }
View Full Code Here

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

        contentList.add(new CSSStringValue(CSSStringType.STRING,
            parameters.getStringValue()));
      }
      else if (CSSValueFactory.isNumericValue(parameters))
      {
        final CSSNumericValue numericValue =
            CSSValueFactory.createNumericValue(parameters);
        if (numericValue == null)
        {
          return null;
        }
        contentList.add(numericValue);
      }
      else if (CSSValueFactory.isLengthValue(parameters))
      {
        final CSSNumericValue lengthValue =
            CSSValueFactory.createLengthValue(parameters);
        if (lengthValue == null)
        {
          return null;
        }
View Full Code Here

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

  public double getScaleLargerFactor(final double parentSize)
  {
    for (int i = 0; i < predefinedSizes.length; i++)
    {
      final CSSNumericValue size = predefinedSizes[i];
      if (parentSize < size.getValue())
      {
        return predefinedScalingFactors[i];
      }
    }
    return predefinedScalingFactors[6];
View Full Code Here

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

  public double getScaleSmallerFactor(final double parentSize)
  {
    for (int i = predefinedSizes.length; i >= 0; i--)
    {
      final CSSNumericValue size = predefinedSizes[i];
      if (parentSize > size.getValue())
      {
        return predefinedScalingFactors[i];
      }
    }
    return predefinedScalingFactors[0];
View Full Code Here

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

      final int parentFontWeight = queryParent(currentNode.getParentLayoutElement());
      fontWeight = Math.min (100, parentFontWeight - 100);
    }
    else if (value instanceof CSSNumericValue)
    {
      final CSSNumericValue nval = (CSSNumericValue) value;
      if (CSSNumericType.NUMBER.equals(nval.getType()) == false)
      {
        // preserve the parent's weight...
        fontWeight = queryParent(currentNode.getParentLayoutElement());
      }
      else
      {
        fontWeight = (int) nval.getValue();
      }
    }
    else
    {
      fontWeight = queryParent(currentNode.getParentLayoutElement());
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.