jaxx.css
Class StylesheetHelper
java.lang.Object
jaxx.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:
- chemit
|
Method Summary |
static int |
appliesTo(Rule rule,
CompiledObject object)
|
static int |
appliesTo(Selector selector,
CompiledObject object)
|
static void |
applyPseudoClass(java.lang.String pseudoClass,
java.util.Map<java.lang.String,java.lang.String> properties,
CompiledObject object,
JAXXCompiler compiler,
int priority)
|
static void |
applyTo(CompiledObject object,
JAXXCompiler compiler,
Stylesheet stylesheet,
Stylesheet overrides)
|
static void |
compilePseudoClassAdd(java.lang.String pseudoClass,
CompiledObject object,
java.lang.String propertyCode,
JAXXCompiler compiler)
|
static void |
compilePseudoClassRemove(java.lang.String pseudoClass,
CompiledObject object,
java.lang.String propertyCode,
JAXXCompiler compiler)
|
static java.util.Map<java.lang.String,java.lang.String> |
getApplicableProperties(Stylesheet s,
CompiledObject object)
|
static Rule[] |
getApplicablePseudoClasses(Stylesheet s,
CompiledObject object)
|
static Rule |
inlineAttribute(CompiledObject object,
java.lang.String propertyName,
boolean dataBinding)
|
static java.lang.String |
invert(java.lang.String javaCode)
|
static java.lang.String |
replaceObjectReferences(java.lang.String code,
java.lang.String id)
Replaces all references to the variable "object" with the actual object ID. |
static void |
scanNode(SimpleNode node,
java.lang.String id)
|
static java.lang.String |
unwrap(ClassDescriptor type,
java.lang.String valueCode)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StylesheetHelper
public StylesheetHelper()
applyTo
public static void applyTo(CompiledObject object,
JAXXCompiler compiler,
Stylesheet stylesheet,
Stylesheet overrides)
throws CompilerException
- Throws:
CompilerException
replaceObjectReferences
public static java.lang.String replaceObjectReferences(java.lang.String code,
java.lang.String id)
throws CompilerException
- Replaces all references to the variable "object" with the actual object ID.
- Parameters:
code - ?id - ?
- Returns:
- ?
- Throws:
CompilerException - ?
scanNode
public static void scanNode(SimpleNode node,
java.lang.String id)
compilePseudoClassAdd
public static void compilePseudoClassAdd(java.lang.String pseudoClass,
CompiledObject object,
java.lang.String propertyCode,
JAXXCompiler compiler)
throws CompilerException
- Throws:
CompilerException
compilePseudoClassRemove
public static void compilePseudoClassRemove(java.lang.String pseudoClass,
CompiledObject object,
java.lang.String propertyCode,
JAXXCompiler compiler)
throws CompilerException
- Throws:
CompilerException
invert
public static java.lang.String invert(java.lang.String javaCode)
unwrap
public static java.lang.String unwrap(ClassDescriptor type,
java.lang.String valueCode)
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
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
public static int appliesTo(Rule rule,
CompiledObject object)
throws CompilerException
- Throws:
CompilerException
appliesTo
public static int appliesTo(Selector selector,
CompiledObject object)
Copyright © 2008-2009 CodeLutin. All Rights Reserved.