Examples of CSSFunctionValue


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

  public void testParseColorFunction()
  {
    StyleSheet s = new StyleSheet();
    CSSStyleRule rule = new CSSStyleRule(s, null);
    rule.setPropertyValueAsString(BorderStyleKeys.BACKGROUND_COLOR, "rgb(0,255,0)");
    final CSSFunctionValue value = (CSSFunctionValue) rule.getPropertyCSSValue(BorderStyleKeys.BACKGROUND_COLOR);
    assertEquals("rgb", value.getFunctionName());
    final CSSValue[] cssValues = value.getParameters();
    assertEquals("Parameter-count", 3, cssValues.length);
    assertEquals("Parameter1", "0", cssValues[0].toString());
    assertEquals("Parameter2", "255", cssValues[1].toString());
    assertEquals("Parameter3", "0", cssValues[2].toString());
  }
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.