|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.graphstream.ui.graphicGraph.stylesheet.Selector
public class Selector
A selector is the part of a CSS rule that defines to which element a style applies in the graph.
Nested Class Summary | |
---|---|
static class |
Selector.Type
Types of elements. |
Field Summary | |
---|---|
String |
clazz
If the selector specify a class. |
String |
id
If the selector specify an identifier. |
String |
pseudoClass
If the selector also specify a pseudo class. |
Selector.Type |
type
The kind of element this matcher applies to. |
Constructor Summary | |
---|---|
Selector(Selector.Type type)
New selector for a given type of element. |
|
Selector(Selector.Type type,
String identifier,
String clazz)
New selector for a given type of element. |
|
Selector(Selector other)
New selector, copy of another. |
|
Selector(String type)
Utility constructor that assign the correct type to the selector from a string. |
Method Summary | |
---|---|
String |
getClazz()
The class of elements this selector applies to. |
String |
getId()
The identifier of the element this selector uniquely applies to. |
String |
getPseudoClass()
The pseudo-class of elements this selector applies to. |
Selector.Type |
getType()
The kind of elements this selector applies to. |
void |
setClass(String clazz)
Specify the class of the elements this selector applies to. |
void |
setId(String id)
Specify the identifier of the unique element this selector applies to. |
void |
setPseudoClass(String pseudoClass)
Specify the pseudo-class of the elements this selector applies to. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Selector.Type type
public String id
public String clazz
public String pseudoClass
Constructor Detail |
---|
public Selector(Selector.Type type)
type
- The element type of this selector.public Selector(Selector.Type type, String identifier, String clazz)
type
- The element type of this selector.identifier
- The element name.clazz
- The element class.public Selector(String type)
type
- Either "node", "edge", "graph" or "sprite".public Selector(Selector other)
other
- The other selector.Method Detail |
---|
public void setId(String id)
id
- A string that identifies an element of the graph.public void setClass(String clazz)
clazz
- A string that matches all elements of a given class.public void setPseudoClass(String pseudoClass)
pseudoClass
- A string that matches all elements of a given pseudo-class.public Selector.Type getType()
public String getId()
public String getClazz()
public String getPseudoClass()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |