Package ej.mwt.stylesheet.selector
Class SelectorHelper
- java.lang.Object
-
- ej.mwt.stylesheet.selector.SelectorHelper
-
public class SelectorHelper extends java.lang.ObjectProvides utility methods related to selectors.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetSpecificity(int a, int b, int c, int d)Computes the specificity of a selector.
-
-
-
Method Detail
-
getSpecificity
public static int getSpecificity(int a, int b, int c, int d)Computes the specificity of a selector.- Parameters:
a- 1 if the declaration is from is a 'style' attribute rather than a rule with a selector, 0 otherwise.b- the number of ID attributes in the selector.c- the number of other attributes and pseudo-classes in the selector.d- the number of widget names and pseudo-widgets in the selector.- Returns:
- the selector specificity.
-
-