|
From: Patrick H. <pa...@13...> - 2001-05-03 15:31:58
|
I am having a problem trying to override the default text assigned to a
VisualEdge object. My code is roughly like the following:
public class MyClass extends VisualGraph {
public boolean connectNodes (Vertex from, Vertex to) {
try {
Edge edge = getGraph().addEdge(from, to);
VisualEdge vis_edge = getVisualEdge(edge);
vis_edge.setText("My label");
}
catch (Exception e) {
// Handle exception ...
}
}
}:
If I call vis_edge.getText(), it gives me a String containing "My label",
but in the visual graph, the label always displays the from -> to
relationship. What am I doing wrong?
-Patrick
Patrick L. Hartling | Research Assistant, VRAC
pa...@13... | 2624 Howe Hall -- (515)294-4916
http://www.137.org/patrick/ | http://www.vrac.iastate.edu/
|