- try {
- Constructor<? extends BasicConnectionStyle> c = baseStyle.getClass().getConstructor(Color.class, Color.class, double.class, Stroke.class, Stroke.class, double.class, double.class);
- renderer = new StyledRouteGraphRenderer(c.newInstance(
- dynamicColor != null ? dynamicColor : baseStyle.getLineColor(),
- baseStyle.getBranchPointColor(), baseStyle.getBranchPointRadius(),
- dynamicStroke != null ? dynamicStroke : baseStyle.getLineStroke(),
- dynamicStroke != null ? dynamicStroke : baseStyle.getRouteLineStroke(),
- baseStyle.getDegeneratedLineLength(), baseStyle.getRounding()));
- } catch (Exception e) {
- renderer = new StyledRouteGraphRenderer(new BasicConnectionStyle(
- dynamicColor != null ? dynamicColor : baseStyle.getLineColor(),
- baseStyle.getBranchPointColor(), baseStyle.getBranchPointRadius(),
- dynamicStroke != null ? dynamicStroke : baseStyle.getLineStroke(),
- dynamicStroke != null ? dynamicStroke : baseStyle.getRouteLineStroke(),
- baseStyle.getDegeneratedLineLength(), baseStyle.getRounding()));
+ if (baseStyle != null) {
+ try {
+ Constructor<? extends BasicConnectionStyle> c = baseStyle.getClass().getConstructor(Color.class, Color.class, double.class, Stroke.class, Stroke.class, double.class, double.class, double.class);
+ renderer = new StyledRouteGraphRenderer(c.newInstance(
+ dynamicColor != null ? dynamicColor : baseStyle.getLineColor(),
+ baseStyle.getBranchPointColor(), baseStyle.getBranchPointRadius(),
+ dynamicStroke != null ? dynamicStroke : baseStyle.getLineStroke(),
+ dynamicStroke != null ? dynamicStroke : baseStyle.getRouteLineStroke(),
+ baseStyle.getDegeneratedLineLength(), baseStyle.getRounding(), baseStyle.getOffset()));
+ } catch (Exception e) {
+ renderer = new StyledRouteGraphRenderer(new BasicConnectionStyle(
+ dynamicColor != null ? dynamicColor : baseStyle.getLineColor(),
+ baseStyle.getBranchPointColor(), baseStyle.getBranchPointRadius(),
+ dynamicStroke != null ? dynamicStroke : baseStyle.getLineStroke(),
+ dynamicStroke != null ? dynamicStroke : baseStyle.getRouteLineStroke(),
+ baseStyle.getDegeneratedLineLength(), baseStyle.getRounding(), baseStyle.getOffset()));
+ }
+ } else {
+ // TODO: support AggregateConnectionStyle
+ renderer = baseRenderer;