public class Selector
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Selector.Type
Types of elements.
|
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
clazz
If the selector specify a class.
|
java.lang.String |
id
If the selector specify an identifier.
|
java.lang.String |
pseudoClass
If the selector also specify a pseudo class.
|
Selector.Type |
type
The kind of element this matcher applies to.
|
| Constructor and Description |
|---|
Selector(Selector.Type type)
New selector for a given type of element.
|
Selector(Selector.Type type,
java.lang.String identifier,
java.lang.String clazz)
New selector for a given type of element.
|
Selector(Selector other)
New selector, copy of another.
|
Selector(java.lang.String type)
Utility constructor that assign the correct type to the selector from a
string.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getClazz()
The class of elements this selector applies to.
|
java.lang.String |
getId()
The identifier of the element this selector uniquely applies to.
|
java.lang.String |
getPseudoClass()
The pseudo-class of elements this selector applies to.
|
Selector.Type |
getType()
The kind of elements this selector applies to.
|
void |
setClass(java.lang.String clazz)
Specify the class of the elements this selector applies to.
|
void |
setId(java.lang.String id)
Specify the identifier of the unique element this selector applies to.
|
void |
setPseudoClass(java.lang.String pseudoClass)
Specify the pseudo-class of the elements this selector applies to.
|
java.lang.String |
toString() |
public Selector.Type type
public java.lang.String id
public java.lang.String clazz
public java.lang.String pseudoClass
public Selector(Selector.Type type)
type - The element type of this selector.public Selector(Selector.Type type, java.lang.String identifier, java.lang.String clazz)
type - The element type of this selector.identifier - The element name.clazz - The element class.public Selector(java.lang.String type)
type - Either "node", "edge", "graph" or "sprite".public Selector(Selector other)
other - The other selector.public void setId(java.lang.String id)
id - A string that identifies an element of the graph.public void setClass(java.lang.String clazz)
clazz - A string that matches all elements of a given class.public void setPseudoClass(java.lang.String pseudoClass)
pseudoClass - A string that matches all elements of a given pseudo-class.public Selector.Type getType()
public java.lang.String getId()
public java.lang.String getClazz()
public java.lang.String getPseudoClass()
public java.lang.String toString()
toString in class java.lang.Object