if (isRouteNode(element)) {
AbstractNode node = (AbstractNode) element;
String label = DiagramUtils.filterFigureLabel(node.getDisplayText(useNodeIdForLabel));
return label;
} else if (element instanceof HasName) {
HasName h = (HasName) element;
return h.getName();
} else if (element instanceof Flow) {
Flow flow = (Flow) element;
INodeStatistics stats = getStatsFor(flow);
if (stats != null) {
return statsLabel(stats);