public class Selector extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Selector.Type
Types of elements.
|
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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() |
public Selector.Type type
public String id
public String clazz
public String pseudoClass
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.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()
Copyright © 2015. All rights reserved.