/**
* Return the rendered visual representation of this node.
*/
public Figure render(Object n) {
ComponentEntity actor = (ComponentEntity) _controller
.getGraphModel().getSemanticObject(n);
boolean isEllipse = actor instanceof Controller
|| actor instanceof Memory
|| actor instanceof ContentionAlarm;
BasicFigure f;
if (isEllipse) {
f = new BasicEllipse(0, 0, _size, _size);
} else {
f = new BasicRectangle(0, 0, _size, _size);
f.setFillPaint(Color.blue);
}
String label = actor.getName();
LabelWrapper w = new LabelWrapper(f, label);
w.setAnchor(SwingConstants.SOUTH);
w.getLabel().setAnchor(SwingConstants.NORTH);
return w;
}