|
||||||||||
| 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
| Field Summary |
|---|
| Fields inherited from class com.vaadin.sass.internal.tree.Node |
|---|
children, parentNode |
| Constructor Summary | |
|---|---|
ScssStylesheet()
Read in a file SCSS and parse it into a ScssStylesheet |
|
| Method Summary | |
|---|---|
void |
addChild(int index,
VariableNode node)
|
static void |
addVariable(VariableNode node)
|
static void |
closeVariableScope(java.util.Map<java.lang.String,VariableNode> originalScope)
End a scope for variables, replacing all active variables with those from the original scope (obtained from openVariableScope()). |
void |
compile()
Applies all the visitors and compiles SCSS into Css. |
static ScssStylesheet |
get()
|
static ScssStylesheet |
get(java.lang.String identifier)
Main entry point for the SASS compiler. |
static ScssStylesheet |
get(java.lang.String identifier,
java.lang.String encoding)
Main entry point for the SASS compiler. |
java.lang.String |
getCharset()
|
java.lang.String |
getFileName()
|
static java.util.HashMap<Node,Node> |
getLastNodeAdded()
|
static MixinDefNode |
getMixinDefinition(java.lang.String name)
|
static VariableNode |
getVariable(java.lang.String string)
|
static java.util.ArrayList<VariableNode> |
getVariables()
|
static java.util.Map<java.lang.String,VariableNode> |
openVariableScope()
Start a new scope for variables. |
void |
removeEmptyBlocks(Node node)
|
org.w3c.css.sac.InputSource |
resolveStylesheet(java.lang.String identifier)
|
void |
setCharset(java.lang.String charset)
|
void |
setFileName(java.lang.String fileName)
|
static void |
setStylesheetResolvers(ScssStylesheetResolver... styleSheetResolvers)
|
java.lang.String |
toString()
Prints out the current state of the node tree. |
void |
traverse()
Method for manipulating the data contained within the Node. |
boolean |
traverse(Node node)
Traverses a node and its children recursively, calling all the appropriate handlers via Node.traverse(). |
static void |
warning(java.lang.String msg)
|
| Methods inherited from class com.vaadin.sass.internal.tree.Node |
|---|
appendAll, appendChild, appendChild, appendChildrenAfter, getChildren, getParentNode, hasChildren, removeChild, setChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ScssStylesheet()
file -
java.io.IOException| Method Detail |
|---|
public static ScssStylesheet get(java.lang.String identifier)
throws org.w3c.css.sac.CSSException,
java.io.IOException
identifier - The file path. If null then null is returned.
org.w3c.css.sac.CSSException
java.io.IOException
public static ScssStylesheet get(java.lang.String identifier,
java.lang.String encoding)
throws org.w3c.css.sac.CSSException,
java.io.IOException
identifier - The file path. If null then null is returned.encoding -
org.w3c.css.sac.CSSException
java.io.IOExceptionpublic static void setStylesheetResolvers(ScssStylesheetResolver... styleSheetResolvers)
public org.w3c.css.sac.InputSource resolveStylesheet(java.lang.String identifier)
public void compile()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String toString()
toString in class Node
public void addChild(int index,
VariableNode node)
public static ScssStylesheet get()
public void traverse()
NodeNode.
Traversing a node is allowed to modify the node, replace it with one or
more nodes at the same or later position in its parent and modify the
children of the node, but not modify or remove preceding nodes in its
parent.
traverse in class Nodepublic boolean traverse(Node node)
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.
node - node to traverse
public static java.util.Map<java.lang.String,VariableNode> openVariableScope()
closeVariableScope(Map)
call at the end of the scope (unmodifiable map).public static void closeVariableScope(java.util.Map<java.lang.String,VariableNode> originalScope)
openVariableScope()).
originalScope - original scopepublic void removeEmptyBlocks(Node node)
public static void addVariable(VariableNode node)
public static VariableNode getVariable(java.lang.String string)
public static java.util.ArrayList<VariableNode> getVariables()
public static MixinDefNode getMixinDefinition(java.lang.String name)
public void setFileName(java.lang.String fileName)
public java.lang.String getFileName()
public static java.util.HashMap<Node,Node> getLastNodeAdded()
public static final void warning(java.lang.String msg)
public java.lang.String getCharset()
public void setCharset(java.lang.String charset)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||