X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.diagram%2Fsrc%2Forg%2Fsimantics%2Fdiagram%2Fconnection%2FConnectionVisuals.java;h=5f62ac31469798b15ac2d95ec2712a75b108bcc2;hb=refs%2Fchanges%2F59%2F1059%2F1;hp=45e4079065f76f1932f26c04b5035f61229a13ec;hpb=fbe11e06b43714aa286a307f12f185d33ba4c5ca;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/connection/ConnectionVisuals.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/connection/ConnectionVisuals.java index 45e407906..5f62ac314 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/connection/ConnectionVisuals.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/connection/ConnectionVisuals.java @@ -25,14 +25,16 @@ public class ConnectionVisuals { public final float[] color; public final StrokeType strokeType; public final Stroke stroke; + public final Double branchPointRadius; public final Double rounding; - public ConnectionVisuals(float[] color, StrokeType strokeType, Stroke stroke, Double rounding) { + public ConnectionVisuals(float[] color, StrokeType strokeType, Stroke stroke, Double branchPointRadius, Double rounding) { if (color != null && color.length < 3) throw new IllegalArgumentException("colors must have at least 3 components (rgb), got " + color.length); this.color = color; this.strokeType = strokeType; this.stroke = stroke; + this.branchPointRadius = branchPointRadius; this.rounding = rounding; } @@ -48,6 +50,7 @@ public class ConnectionVisuals { public int hashCode() { final int prime = 31; int result = 1; + result = prime * result + ((branchPointRadius == null) ? 0 : branchPointRadius.hashCode()); result = prime * result + Arrays.hashCode(color); result = prime * result + ((rounding == null) ? 0 : rounding.hashCode()); result = prime * result + ((stroke == null) ? 0 : stroke.hashCode()); @@ -64,6 +67,11 @@ public class ConnectionVisuals { if (getClass() != obj.getClass()) return false; ConnectionVisuals other = (ConnectionVisuals) obj; + if (branchPointRadius == null) { + if (other.branchPointRadius != null) + return false; + } else if (!branchPointRadius.equals(other.branchPointRadius)) + return false; if (!Arrays.equals(color, other.color)) return false; if (rounding == null) { @@ -80,5 +88,4 @@ public class ConnectionVisuals { return false; return true; } - }