Hello everyone... I am using JUNG to make a network diagram. I want to shape the vertices depending upon its type. The vertices are pickable and colored. The code for vertices so far is as under:
class VertexColors extends PickableVertexPaintTransformer<Number> {
VertexColors(PickedInfo<Number> pi) {
super(pi, Color.blue, Color.yellow);
}
public Paint transform(Number v) {
if (pi.isPicked(v.intValue())) return picked_paint;
return v.intValue()%2==1 ? Color.blue : Color.green;
}
}
I am using the following statement for each vertex:
vv.getRenderContext().setVertexFillPaintTransformer(new VertexColors(vv.getPickedVertexState()));
Now, I cannot find a way to shape the vertices while keeping them pickable and to wrap the vertices around their labels. Please help...