|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.graphstream.ui.graphicGraph.stylesheet.Rule
public class Rule
Style application rule.
A rule is made of a selector and values. The selector identifies the element(s) this rule applies to, and the values are styles to apply to the matched elements.
Field Summary | |
---|---|
HashSet<String> |
groups
Optionally, the rule can store all the style groups it participates in. |
Selector |
selector
The match. |
Style |
style
The style. |
Constructor Summary | |
---|---|
Rule(Selector selector)
New rule with a matcher. |
|
Rule(Selector selector,
Rule parent)
|
Method Summary | |
---|---|
void |
addGroup(String groupId)
Specify that this rule participates in the given style group. |
HashSet<String> |
getGroups()
The group this rule participate in, maybe null if the rule does not participate in any group. |
Style |
getStyle()
This rule style. |
boolean |
matchId(String identifier)
True if this rule selector match the given identifier. |
void |
removeGroup(String groupId)
Remove this rule from the style group. |
void |
setStyle(Style style)
Change the style. |
String |
toString()
|
String |
toString(int level)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Selector selector
public Style style
public HashSet<String> groups
Constructor Detail |
---|
public Rule(Selector selector)
selector
- The rule selector.public Rule(Selector selector, Rule parent)
Method Detail |
---|
public Style getStyle()
public HashSet<String> getGroups()
public boolean matchId(String identifier)
identifier
- The identifier to test for the match.
public void setStyle(Style style)
style
- A style specification.public void addGroup(String groupId)
groupId
- The group unique identifier.public void removeGroup(String groupId)
groupId
- The group unique identifier.public String toString()
toString
in class Object
public String toString(int level)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |