case LexicalUnit.SAC_SECOND: return new NumberValue(value.getFloatValue(), value.getDimensionUnitText()); case LexicalUnit.SAC_URI: return new IdentValue("url(" + value.getStringValue() + ")");
|| type == LexicalUnit.SAC_DIMENSION ) buffer.append( "DIM " + value.getFloatValue() + value.getDimensionUnitText() ); } else if( type == LexicalUnit.SAC_RGBCOLOR ) { LexicalUnit parameters = value.getParameters();
public String getCssText() { // TODO: All LexicalUnit.SAC_OPERATOR_* except for COMMA left undone for // now as it's not even clear whether they should be treated as measures // see bug #278139 switch (value.getLexicalUnitType()) { case LexicalUnit.SAC_INTEGER: return String.valueOf(value.getIntegerValue()); case LexicalUnit.SAC_REAL: return String.valueOf(value.getFloatValue()); case LexicalUnit.SAC_PERCENTAGE: case LexicalUnit.SAC_PIXEL: case LexicalUnit.SAC_CENTIMETER: case LexicalUnit.SAC_EM: case LexicalUnit.SAC_EX: case LexicalUnit.SAC_PICA: case LexicalUnit.SAC_POINT: case LexicalUnit.SAC_INCH: case LexicalUnit.SAC_DEGREE: return String.valueOf(value.getFloatValue()) + value.getDimensionUnitText(); case LexicalUnit.SAC_URI: return "url(" + value.getStringValue() + ")"; case LexicalUnit.SAC_OPERATOR_COMMA: return ","; case LexicalUnit.SAC_INHERIT: return "inherit"; } return value.getStringValue(); } }
case LexicalUnit.SAC_KILOHERTZ: return lu.getFloatValue() + lu.getDimensionUnitText(); case LexicalUnit.SAC_INTEGER:
case LexicalUnit.SAC_SECOND: return new NumberValue(value.getFloatValue(), value.getDimensionUnitText()); case LexicalUnit.SAC_URI: return new IdentValue("url(" + value.getStringValue() + ")");
case LexicalUnit.SAC_SECOND: return new NumberValue(value.getFloatValue(), value.getDimensionUnitText()); case LexicalUnit.SAC_URI: return new IdentValue("url(" + value.getStringValue() + ")");