Package jaxx.compiler.css
Class StylesheetHelper
java.lang.Object
jaxx.compiler.css.StylesheetHelper
public class StylesheetHelper
extends java.lang.Object
A helper class to compute
Stylesheet, Rule and Selector
and 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 - chemit@codelutin.com
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStylesheetHelper.MouseEventEnumstatic classStylesheetHelper.PseudoClassEnum -
Constructor Summary
Constructors Constructor Description StylesheetHelper() -
Method Summary
Modifier and Type Method Description static intappliesTo(Rule rule, CompiledObject object)static intappliesTo(Selector selector, CompiledObject object)static voidapplyPseudoClass(java.lang.String pseudoClass, java.util.Map<java.lang.String,java.lang.String> properties, CompiledObject object, JAXXCompiler compiler, int priority)static voidapplyTo(CompiledObject object, JAXXCompiler compiler, Stylesheet stylesheet, Stylesheet overrides)static voidcompilePseudoClass(java.lang.String pseudoClass, CompiledObject object, java.lang.String propertyCode, int pos, java.lang.String methodName, JAXXCompiler compiler, boolean invertTest)static MethodDescriptorgetAddMouseListenerMethod(CompiledObject object)static java.util.Map<java.lang.String,java.lang.String>getApplicableProperties(Stylesheet s, CompiledObject object)static Rule[]getApplicablePseudoClasses(Stylesheet s, CompiledObject object)static ClassDescriptorgetMouseEventDescriptor()static ClassDescriptorgetMouseListenerDescriptor()static MethodDescriptorgetMouseListenerMethod(CompiledObject object, java.lang.String property)static RuleinlineAttribute(CompiledObject object, java.lang.String propertyName, boolean dataBinding)static RuleprocessRule(SimpleNode ruleNode)static SelectorprocessSelector(SimpleNode selector)static StylesheetprocessStylesheet(java.lang.String stylesheetText)static java.lang.Stringunwrap(ClassDescriptor type, java.lang.String valueCode)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
StylesheetHelper
public StylesheetHelper()
-
-
Method Details
-
processStylesheet
public static Stylesheet processStylesheet(java.lang.String stylesheetText) throws CompilerException- Throws:
CompilerException
-
processRule
-
processSelector
-
getMouseEventDescriptor
-
getMouseListenerDescriptor
-
getAddMouseListenerMethod
-
getMouseListenerMethod
public static MethodDescriptor getMouseListenerMethod(CompiledObject object, java.lang.String property) -
applyTo
public static void applyTo(CompiledObject object, JAXXCompiler compiler, Stylesheet stylesheet, Stylesheet overrides) throws CompilerException- Throws:
CompilerException
-
unwrap
-
applyPseudoClass
public static void applyPseudoClass(java.lang.String pseudoClass, java.util.Map<java.lang.String,java.lang.String> properties, CompiledObject object, JAXXCompiler compiler, int priority) throws CompilerException- Throws:
CompilerException
-
compilePseudoClass
public static void compilePseudoClass(java.lang.String pseudoClass, CompiledObject object, java.lang.String propertyCode, int pos, java.lang.String methodName, JAXXCompiler compiler, boolean invertTest) throws CompilerException- Throws:
CompilerException
-
getApplicableProperties
public static java.util.Map<java.lang.String,java.lang.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, java.lang.String propertyName, boolean dataBinding) -
appliesTo
- Throws:
CompilerException
-
appliesTo
-