} catch (AccessControlException e) {
rendererClassName = null;
}
if (rendererClassName == null)
return new SwingBasicGraphRenderer();
try {
Class<?> c = Class.forName(rendererClassName);
Object object = c.newInstance();
if (object instanceof GraphRenderer) {
return (GraphRenderer) object;
} else {
logger.warning(String.format("Class '%s' is not a 'GraphRenderer'.", object));
}
} catch (Exception e) {
logger.log(Level.WARNING, "Cannot create graph renderer.", e);
}
return new SwingBasicGraphRenderer();
}