public class CascadingStyleSheet extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,Selector> |
affectedSelectors |
protected List<org.ginsim.core.graph.view.css.StyleSheet> |
cascade |
Constructor and Description |
---|
CascadingStyleSheet()
Create and initialize the collections of the CSS
|
Modifier and Type | Method and Description |
---|---|
protected void |
addStyleSheet(org.ginsim.core.graph.view.css.StyleSheet styleSheet) |
protected void |
apply(Collection nodes,
NodeAttributesReader vreader,
Collection edges,
EdgeAttributesReader ereader,
CascadingStyleSheetManager cs) |
void |
apply(Graph graph,
CascadingStyleSheetManager cs)
Apply this css on a graph using a CascadingStyleSheetManager
Note this css needs to be compiled before
|
void |
compile()
Compile the CSS, allowing it to be applied.
|
static CascadingStyleSheet |
newFromText(String text)
Return a new CSS object from a text.
|
void |
parse(String text)
Return a new CSS object from a text.
|
String |
readFile(Reader reader)
Return a new CSS object from a Reader.
|
String |
toString() |
protected List<org.ginsim.core.graph.view.css.StyleSheet> cascade
public CascadingStyleSheet()
public void apply(Graph graph, CascadingStyleSheetManager cs)
graph
- cs
- protected void apply(Collection nodes, NodeAttributesReader vreader, Collection edges, EdgeAttributesReader ereader, CascadingStyleSheetManager cs)
public void compile()
public static CascadingStyleSheet newFromText(String text) throws CSSSyntaxException
text
- CSSSyntaxException
public void parse(String text) throws CSSSyntaxException
text
- CSSSyntaxException
public String readFile(Reader reader) throws CSSSyntaxException
text
- CSSSyntaxException
protected void addStyleSheet(org.ginsim.core.graph.view.css.StyleSheet styleSheet)
Copyright © 2005–2020. All rights reserved.