Package org.xhtmlrenderer.css.style.derived

Examples of org.xhtmlrenderer.css.style.derived.LengthValue


        setRight(fromVal, style, second, ctx);
        //_right = style.getFloatPropertyProportionalHeight(fromVal, 0, ctx);
        //_left = style.getFloatPropertyProportionalWidth(fromVal, 0, ctx);
      }
    } else if(value instanceof LengthValue){
      LengthValue lv = (LengthValue)value;
     
      if(lv.getStringValue().contains("%")) {
        _leftPercent = _rightPercent = true;
        _left = _right = value.asFloat() / 100.0f;
      } else {
        _left = _right = (int) lv.getFloatProportionalTo(fromVal, 0, ctx);
      }
      //first = second = (LengthValue)value;
    }
      //System.out.println(fromVal + " " + _left + " " + _right);
      //this._right = this._left = ((PropertyValue)((ListValue)fromVal).getValues().get(0)).getFloatValue();
View Full Code Here


            CalculatedStyle style = root.getStyle();
            PropertyValue fontFamilyProp = new PropertyValue(CSSPrimitiveValue.CSS_STRING, getFont().getFamily(),
                    getFont().getFamily());
            fontFamilyProp.setStringArrayValue(new String[] { fontFamilyProp.getStringValue() });
            style.setDefaultValue(CSSName.FONT_FAMILY, new StringValue(CSSName.FONT_FAMILY, fontFamilyProp));
            style.setDefaultValue(CSSName.FONT_SIZE, new LengthValue(style, CSSName.FONT_SIZE,
                    new PropertyValue(CSSPrimitiveValue.CSS_PX, getFont().getSize(), Integer
                            .toString(getFont().getSize()))));
            Color c = getForeground();
            style.setDefaultValue(CSSName.COLOR, new ColorValue(CSSName.COLOR,
                    new PropertyValue(new FSRGBColor(c.getRed(), c.getGreen(), c.getBlue()))));
View Full Code Here

TOP

Related Classes of org.xhtmlrenderer.css.style.derived.LengthValue

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.