Java Code Examples for org.w3c.css.sac.LexicalUnit#SAC_RADIAN

The following examples show how to use org.w3c.css.sac.LexicalUnit#SAC_RADIAN . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CSSValue.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
public short getPrimitiveType( )
{
	if ( value instanceof LexicalUnit )
	{
		LexicalUnit lu = (LexicalUnit) value;
		switch ( lu.getLexicalUnitType( ) )
		{
			case LexicalUnit.SAC_INHERIT :
				return CSS_IDENT;
			case LexicalUnit.SAC_INTEGER :
			case LexicalUnit.SAC_REAL :
				return CSS_NUMBER;
			case LexicalUnit.SAC_EM :
				return CSS_EMS;
			case LexicalUnit.SAC_EX :
				return CSS_EXS;
			case LexicalUnit.SAC_PIXEL :
				return CSS_PX;
			case LexicalUnit.SAC_INCH :
				return CSS_IN;
			case LexicalUnit.SAC_CENTIMETER :
				return CSS_CM;
			case LexicalUnit.SAC_MILLIMETER :
				return CSS_MM;
			case LexicalUnit.SAC_POINT :
				return CSS_PT;
			case LexicalUnit.SAC_PICA :
				return CSS_PC;
			case LexicalUnit.SAC_PERCENTAGE :
				return CSS_PERCENTAGE;
			case LexicalUnit.SAC_URI :
				return CSS_URI;
			case LexicalUnit.SAC_DEGREE :
				return CSS_DEG;
			case LexicalUnit.SAC_GRADIAN :
				return CSS_GRAD;
			case LexicalUnit.SAC_RADIAN :
				return CSS_RAD;
			case LexicalUnit.SAC_MILLISECOND :
				return CSS_MS;
			case LexicalUnit.SAC_SECOND :
				return CSS_S;
			case LexicalUnit.SAC_HERTZ :
				return CSS_KHZ;
			case LexicalUnit.SAC_KILOHERTZ :
				return CSS_HZ;
			case LexicalUnit.SAC_IDENT :
				return CSS_IDENT;
			case LexicalUnit.SAC_STRING_VALUE :
				return CSS_STRING;
			case LexicalUnit.SAC_ATTR :
				return CSS_ATTR;
			case LexicalUnit.SAC_UNICODERANGE :
			case LexicalUnit.SAC_SUB_EXPRESSION :
			case LexicalUnit.SAC_FUNCTION :
				return CSS_STRING;
			case LexicalUnit.SAC_DIMENSION :
				return CSS_DIMENSION;
		}
	}
	return CSS_UNKNOWN;
}