]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.district.network/src/org/simantics/district/network/profile/DiagramSettings.java
Dynamic Visualisations view improvements & profile refactoring
[simantics/district.git] / org.simantics.district.network / src / org / simantics / district / network / profile / DiagramSettings.java
diff --git a/org.simantics.district.network/src/org/simantics/district/network/profile/DiagramSettings.java b/org.simantics.district.network/src/org/simantics/district/network/profile/DiagramSettings.java
deleted file mode 100644 (file)
index f76a453..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.simantics.district.network.profile;
-
-import java.util.Optional;
-
-import org.simantics.db.Resource;
-import org.simantics.scl.runtime.function.Function1;
-
-/**
- * @author Tuukka Lehtonen
- */
-public class DiagramSettings {
-
-       public final Optional<Function1<Resource, Double>> arrowLengthProperty;
-       public final double arrowLengthGain;
-       public final double arrowLengthBias;
-
-       public DiagramSettings(
-                       Function1<Resource, Double> arrowLengthProperty, double arrowLengthGain, double arrowLengthBias
-                       ) {
-               this.arrowLengthProperty = Optional.ofNullable(arrowLengthProperty);
-               this.arrowLengthGain = arrowLengthGain;
-               this.arrowLengthBias = arrowLengthBias;
-       }
-
-       @Override
-       public int hashCode() {
-               final int prime = 31;
-               int result = 1;
-               //result = prime * result + edgeThicknessProperty.hashCode();
-               result = prime * result + arrowLengthProperty.hashCode();
-               long temp = result;
-               //temp = Double.doubleToLongBits(edgeThicknessGain);
-               result = prime * result + (int) (temp ^ (temp >>> 32));
-               //temp = Double.doubleToLongBits(edgeThicknessBias);
-               result = prime * result + (int) (temp ^ (temp >>> 32));
-               temp = Double.doubleToLongBits(arrowLengthGain);
-               result = prime * result + (int) (temp ^ (temp >>> 32));
-               temp = Double.doubleToLongBits(arrowLengthBias);
-               result = prime * result + (int) (temp ^ (temp >>> 32));
-
-               return result;
-       }
-
-       @Override
-       public boolean equals(Object obj) {
-               if (this == obj)
-                       return true;
-               if (obj == null)
-                       return false;
-               if (getClass() != obj.getClass())
-                       return false;
-               DiagramSettings other = (DiagramSettings) obj;
-
-               if (!arrowLengthProperty.equals(other.arrowLengthProperty))
-                       return false;
-               if (Double.doubleToLongBits(arrowLengthGain) != Double.doubleToLongBits(other.arrowLengthGain))
-                       return false;
-               if (Double.doubleToLongBits(arrowLengthBias) != Double.doubleToLongBits(other.arrowLengthBias))
-                       return false;
-
-               return true;
-       }
-
-       @Override
-       public String toString() {
-               return String.format("DiagramSettings[%s * %f + %f]",
-                               arrowLengthProperty, arrowLengthGain, arrowLengthBias
-                               );
-       }
-
-}