com.vaadin.sass.internal.tree
Class BlockNode

java.lang.Object
  extended by com.vaadin.sass.internal.tree.Node
      extended by com.vaadin.sass.internal.tree.BlockNode
All Implemented Interfaces:
IVariableNode, Serializable

public class BlockNode
extends Node
implements IVariableNode

See Also:
Serialized Form

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
BlockNode(List<Selector> selectorList)
           
BlockNode(List<Selector> selectorList, Collection<Node> children)
           
 
Method Summary
 String buildString(boolean indent)
           
 BlockNode copy()
          Copy a node (deep copy including children).
 List<Selector> getParentSelectors()
          Returns the parent selector list.
 List<Selector> getSelectorList()
          Returns unmodifiable selector list of the block
 String getSelectors()
           
 String printState()
          Prints out the current state of the node tree.
 void replaceVariables(ScssContext context)
           
 void setParentSelectors(List<Selector> parentSelectors)
          Sets the selector list of the parent node.
 void setSelectorList(List<Selector> selectorList)
          Sets the selector list for the node.
 String toString()
           
 Collection<Node> traverse(ScssContext context)
          Method for manipulating the data contained within the Node.
 
Methods inherited from class com.vaadin.sass.internal.tree.Node
appendChild, copyChildren, getChildren, getNormalParentNode, getParentNode, replaceNode, replaceNodeAt, setChildren, traverseChildren, traverseChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BlockNode

public BlockNode(List<Selector> selectorList)

BlockNode

public BlockNode(List<Selector> selectorList,
                 Collection<Node> children)
Method Detail

getSelectorList

public List<Selector> getSelectorList()
Returns unmodifiable selector list of the block

Returns:
selector list

setSelectorList

public void setSelectorList(List<Selector> selectorList)
Sets the selector list for the node. The selector list instance must not be modified after being given as a parameter here.

Parameters:
selectorList - new selector list

buildString

public String buildString(boolean indent)

printState

public String printState()
Description copied from class: Node
Prints out the current state of the node tree. Will return SCSS before compile and CSS after. Result value could be null.

Overrides:
printState in class Node
Returns:
State as a string

toString

public String toString()
Overrides:
toString in class Object

replaceVariables

public void replaceVariables(ScssContext context)
Specified by:
replaceVariables in interface IVariableNode

getSelectors

public String getSelectors()

traverse

public Collection<Node> traverse(ScssContext context)
Description copied from class: Node
Method for manipulating the data contained within the Node. 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. Traversing a node is also allowed to modify the definitions currently in scope as its side-effect.

Specified by:
traverse in class Node
Parameters:
context - current compilation context
Returns:
nodes replacing the current node

copy

public BlockNode copy()
Description copied from class: Node
Copy a node (deep copy including children). The copy is detached from the original tree, with null as parent, and data that is not relevant to handling of function or mixin expansion is not copied.

Specified by:
copy in class Node
Returns:
copy of the node

getParentSelectors

public List<Selector> getParentSelectors()
Returns the parent selector list.

Returns:
parent selector list or null

setParentSelectors

public void setParentSelectors(List<Selector> parentSelectors)
Sets the selector list of the parent node. The list must not be modified after giving it as a parameter here.

Parameters:
parentSelectors - parent selector list or null


Copyright © 2013–2015 Vaadin. All rights reserved.