|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.graph.decorators.StringLabeller
edu.uci.ics.jung.graph.decorators.GlobalStringLabeller
The GlobalStringLabeller applies labels to all vertices in a series of graphs. That is, rather than storing one instance per graph, it stores one instance globally that maps from vertex ID to label.
Nested Class Summary |
Nested classes inherited from class edu.uci.ics.jung.graph.decorators.StringLabeller |
StringLabeller.UniqueLabelException |
Field Summary |
Fields inherited from class edu.uci.ics.jung.graph.decorators.StringLabeller |
DEFAULT_STRING_LABELER_KEY |
Method Summary | |
static StringLabeller |
getInstance()
|
java.lang.String |
getLabel(Vertex v)
Gets the String label associated with a particular Vertex. |
static StringLabeller |
getLabeller(Graph g)
Gets a labeller associated with this graph. |
static boolean |
hasStringLabeller(Graph g)
Checks if a labeller--any labeller--is associated with this graph. |
static boolean |
hasStringLabeller(Graph g,
java.lang.Object key)
Checks for a labeller attached to a particular key in the graph. |
void |
setLabel(Vertex v,
java.lang.String l)
Associates a Vertex with a Label, overrwriting any previous labels on this vertex or vertices equal to it. |
static StringLabeller |
setLabellerTo(Graph g)
Sets the default StringLabeller of this graph to be a ToStringLabeller. |
static StringLabeller |
setLabellerTo(Graph g,
java.lang.Object key)
Sets the StringLabeller of this graph, at this key, to be a ToStringLabeller. |
Methods inherited from class edu.uci.ics.jung.graph.decorators.StringLabeller |
assignDefaultLabels, clear, getGraph, getLabeller, getVertex, removeLabel |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static StringLabeller setLabellerTo(Graph g, java.lang.Object key)
public static StringLabeller getInstance()
public static StringLabeller getLabeller(Graph g)
StringLabeller
public static StringLabeller setLabellerTo(Graph g)
public static boolean hasStringLabeller(Graph g)
g
- The graph to check.public static boolean hasStringLabeller(Graph g, java.lang.Object key)
g
- the Graphkey
- the UserData key to which it is attached
public java.lang.String getLabel(Vertex v)
getLabel
in class StringLabeller
v
- a Vertex
public void setLabel(Vertex v, java.lang.String l) throws StringLabeller.UniqueLabelException
setLabel
in class StringLabeller
v
- a Vertexl
- a Label to be associated with this vertex
UniqueLabelException
- thrown if this label is already associated with some other
vertex.
StringLabeller.UniqueLabelException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |