Class StyleSheet.NameSpace
java.lang.Object
org.graphstream.ui.graphicGraph.stylesheet.StyleSheet.NameSpace
- Enclosing class:
- StyleSheet
public class StyleSheet.NameSpace extends Object
A name space is a tuple (default rule, id rule set, class rule set).
The name space defines a default rule for a kind of elements, a set of rules for this kind of elements with a given identifier, and a set or rules for this kind of elements with a given class.
-
Field Summary
Fields Modifier and Type Field Description HashMap<String,Rule>byClassThe set of rules for this kind of elements with a given class.HashMap<String,Rule>byIdThe set of rules for this kind of elements with a given identifier.RuledefaultRuleThe default rule for this kind of elements.Selector.TypetypeThe kind of elements in this name space. -
Constructor Summary
Constructors Constructor Description NameSpace(Selector.Type type) -
Method Summary
Modifier and Type Method Description intgetClassRulesCount()Number of specific (class) rules.Selector.TypegetGraphElementType()The kind of elements this name space applies rules to.intgetIdRulesCount()Number of specific (id) rules.StringtoString()StringtoString(int level)
-
Field Details
-
type
The kind of elements in this name space. -
defaultRule
The default rule for this kind of elements. -
byId
The set of rules for this kind of elements with a given identifier. -
byClass
The set of rules for this kind of elements with a given class.
-
-
Constructor Details
-
Method Details
-
getGraphElementType
The kind of elements this name space applies rules to.- Returns:
- A type of element (node, edge, sprite, graph).
-
getIdRulesCount
public int getIdRulesCount()Number of specific (id) rules.- Returns:
- The number of rules that apply to elements by their identifiers.
-
getClassRulesCount
public int getClassRulesCount()Number of specific (class) rules.- Returns:
- The number of rules that apply to elements by their classes.
-
toString
-
toString
-