|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.sass.internal.tree.Node
com.vaadin.sass.internal.ScssStylesheet
public class ScssStylesheet
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.vaadin.sass.internal.tree.Node |
|---|
Node.BuildStringStrategy, Node.PrintStrategy, Node.ToStringStrategy |
| Field Summary |
|---|
| Fields inherited from class com.vaadin.sass.internal.tree.Node |
|---|
PRINT_STRATEGY, TO_STRING_STRATEGY |
| Constructor Summary | |
|---|---|
ScssStylesheet()
Read in a file SCSS and parse it into a ScssStylesheet |
|
| Method Summary | |
|---|---|
void |
addResolver(ScssStylesheetResolver resolver)
Adds the given resolver to the resolver list |
void |
addSourceUris(Collection<String> uris)
|
void |
compile()
Applies all the visitors and compiles SCSS into Css. |
Node |
copy()
Copy a node (deep copy including children). |
static ScssStylesheet |
get(String identifier)
Main entry point for the SASS compiler. |
static ScssStylesheet |
get(String identifier,
ScssStylesheet parentStylesheet)
Main entry point for the SASS compiler. |
static ScssStylesheet |
get(String identifier,
ScssStylesheet parentStylesheet,
SCSSDocumentHandler documentHandler,
SCSSErrorHandler errorHandler)
Main entry point for the SASS compiler. |
String |
getCharset()
|
String |
getDirectory()
Returns the directory containing this style sheet |
String |
getFileName()
Returns the full file name for this style sheet |
String |
getPrefix()
|
List<ScssStylesheetResolver> |
getResolvers()
Retrieves a list of resolvers to use when resolving imports |
List<String> |
getSourceUris()
|
String |
printState()
Prints out the current state of the node tree. |
org.w3c.css.sac.InputSource |
resolveStylesheet(String identifier,
ScssStylesheet parentStylesheet)
|
void |
setCharset(String charset)
|
void |
setFile(File file)
|
void |
setPrefix(String prefix)
|
void |
setResolvers(List<ScssStylesheetResolver> resolvers)
Sets the list of resolvers to use when resolving imports |
String |
toString()
|
Collection<Node> |
traverse(ScssContext context)
Traverses a node and its children recursively, calling all the appropriate handlers via Node#traverse(). |
static void |
warning(String msg)
|
| Methods inherited from class com.vaadin.sass.internal.tree.Node |
|---|
appendChild, copyChildren, getChildren, getNormalParentNode, getParentNode, replaceNode, setChildren, traverseChildren, traverseChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ScssStylesheet()
file -
IOException| Method Detail |
|---|
public static ScssStylesheet get(String identifier)
throws org.w3c.css.sac.CSSException,
IOException
identifier - The file path. If null then null is returned.
org.w3c.css.sac.CSSException
IOException
public static ScssStylesheet get(String identifier,
ScssStylesheet parentStylesheet)
throws org.w3c.css.sac.CSSException,
IOException
identifier - The file path. If null then null is returned.parentStylesheet - Style sheet from which to inherit resolvers and encoding. May
be null.
org.w3c.css.sac.CSSException
IOException
public static ScssStylesheet get(String identifier,
ScssStylesheet parentStylesheet,
SCSSDocumentHandler documentHandler,
SCSSErrorHandler errorHandler)
throws org.w3c.css.sac.CSSException,
IOException
identifier - The file path. If null then null is returned.parentStylesheet - Style sheet from which to inherit resolvers and encoding. May
be null.documentHandler - Instance of document handler. May not be null.errorHandler - Instance of error handler. May not be null.
org.w3c.css.sac.CSSException
IOException
public org.w3c.css.sac.InputSource resolveStylesheet(String identifier,
ScssStylesheet parentStylesheet)
public List<ScssStylesheetResolver> getResolvers()
public void setResolvers(List<ScssStylesheetResolver> resolvers)
resolvers - the resolvers to setpublic void addResolver(ScssStylesheetResolver resolver)
resolver - The resolver to addpublic List<String> getSourceUris()
public void addSourceUris(Collection<String> uris)
public void compile()
throws Exception
Exceptionpublic String printState()
printState in class Nodepublic String toString()
toString in class Objectpublic Collection<Node> traverse(ScssContext context)
Node#traverse().
The node itself may be removed during the traversal and replaced with
other nodes at the same position or later on the child list of its
parent.
traverse in class Nodecontext - current compilation context
public void setFile(File file)
public String getDirectory()
public String getFileName()
public static final void warning(String msg)
public String getCharset()
public void setCharset(String charset)
public String getPrefix()
public void setPrefix(String prefix)
public Node copy()
Node
copy in class Node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||