Package org.nuiton.jaxx.compiler.css
Class StylesheetHelper
- java.lang.Object
-
- org.nuiton.jaxx.compiler.css.StylesheetHelper
-
public class StylesheetHelper extends Object
A helper class to computeStylesheet,RuleandSelectorand extract all the compiler logic from this class. In that way we can make the compiler as a single module and a runtime as another module.- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStylesheetHelper.MouseEventEnumstatic classStylesheetHelper.PseudoClassEnum
-
Constructor Summary
Constructors Constructor Description StylesheetHelper()
-
Method Summary
-
-
-
Method Detail
-
getStyleURL
public static URL getStyleURL(String attrValue, File baseDirectory, ClassLoader classLoader) throws IOException
- Throws:
IOException
-
processStylesheet
public static Stylesheet processStylesheet(String stylesheetText) throws CompilerException
- Throws:
CompilerException
-
processRule
public static Rule processRule(SimpleNode ruleNode)
-
processSelector
public static Selector processSelector(SimpleNode selector)
-
getMouseEventDescriptor
public static ClassDescriptor getMouseEventDescriptor()
-
getMouseListenerDescriptor
public static ClassDescriptor getMouseListenerDescriptor()
-
getAddMouseListenerMethod
public static MethodDescriptor getAddMouseListenerMethod(CompiledObject object)
-
getMouseListenerMethod
public static MethodDescriptor getMouseListenerMethod(CompiledObject object, String property)
-
applyTo
public static void applyTo(CompiledObject object, JAXXCompiler compiler, Stylesheet stylesheet, Stylesheet overrides) throws CompilerException
- Throws:
CompilerException
-
unwrap
public static String unwrap(ClassDescriptor type, String valueCode)
-
applyPseudoClass
public static void applyPseudoClass(String pseudoClass, Map<String,String> properties, CompiledObject object, JAXXCompiler compiler, int priority) throws CompilerException
- Throws:
CompilerException
-
compilePseudoClass
public static void compilePseudoClass(String pseudoClass, CompiledObject object, String propertyCode, int pos, String methodName, JAXXCompiler compiler, boolean invertTest) throws CompilerException
- Throws:
CompilerException
-
getApplicableProperties
public static Map<String,String> getApplicableProperties(Stylesheet s, CompiledObject object) throws CompilerException
- Throws:
CompilerException
-
getApplicablePseudoClasses
public static Rule[] getApplicablePseudoClasses(Stylesheet s, CompiledObject object) throws CompilerException
- Throws:
CompilerException
-
inlineAttribute
public static Rule inlineAttribute(CompiledObject object, String propertyName, boolean dataBinding)
-
appliesTo
public static int appliesTo(Rule rule, CompiledObject object) throws CompilerException
- Throws:
CompilerException
-
appliesTo
public static int appliesTo(Selector selector, CompiledObject object)
-
-