|
||||||||||
| 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
public class 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/interfaces inherited from class edu.uci.ics.jung.graph.decorators.StringLabeller |
|---|
StringLabeller.UniqueLabelException |
| Field Summary | |
|---|---|
protected static GlobalStringLabeller |
instance
|
| Fields inherited from class edu.uci.ics.jung.graph.decorators.StringLabeller |
|---|
DEFAULT_STRING_LABELER_KEY, graph, labelToVertex, vertexToLabel |
| Constructor Summary | |
|---|---|
protected |
GlobalStringLabeller()
|
| Method Summary | |
|---|---|
static StringLabeller |
getInstance()
|
String |
getLabel(ArchetypeVertex v)
Gets the String label associated with a particular Vertex. |
static StringLabeller |
getLabeller(Graph g)
|
static boolean |
hasStringLabeller(Graph g)
Checks if a labeller--any labeller--is associated with this graph. |
static boolean |
hasStringLabeller(Graph g,
Object key)
Checks for a labeller attached to a particular key in the graph. |
void |
setLabel(Vertex v,
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,
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 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static GlobalStringLabeller instance
| Constructor Detail |
|---|
protected GlobalStringLabeller()
| Method Detail |
|---|
public static StringLabeller setLabellerTo(Graph g,
Object key)
public static StringLabeller getInstance()
GlobalStringLabeller instancepublic static StringLabeller getLabeller(Graph g)
public static StringLabeller setLabellerTo(Graph g)
public static boolean hasStringLabeller(Graph g)
g - The graph to check.
public static boolean hasStringLabeller(Graph g,
Object key)
g - the Graphkey - the UserData key to which it is attached
public String getLabel(ArchetypeVertex v)
getLabel in interface VertexStringergetLabel in class StringLabellerv - a Vertex
public void setLabel(Vertex v,
String l)
throws StringLabeller.UniqueLabelException
setLabel in class StringLabellerv - 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 | |||||||||