Exemple #1
0
  public boolean getVisibilityFor(double value) {
    final VisualFlowMapModel model = visualFlowMap.getModel();
    double weightFilterMin = model.getEdgeWeightFilterMin();
    double weightFilterMax = model.getEdgeWeightFilterMax();

    //    double edgeLengthFilterMin = model.getEdgeLengthFilterMin();
    //    double edgeLengthFilterMax = model.getEdgeLengthFilterMax();
    //    double length = getEdgeLength();

    double absValue = Math.abs(value);

    PBounds vb = getVisualFlowMap().getCamera().getViewBounds();

    boolean visible =
        !Double.isNaN(value)
            && value != 0.0
            &&
            //        model.getEdgeFilter().accepts(this)
            weightFilterMin <= absValue
            && absValue <= weightFilterMax
            &&
            //        edgeLengthFilterMin <= length && length <= edgeLengthFilterMax &&
            (!isSelfLoop() || visualFlowMap.getModel().getShowSelfLoops())
            && (vb.contains(getSourceNode().getPoint()) || vb.contains(getTargetNode().getPoint()));

    return visible;
  }
Exemple #2
0
 private double getSelfLoopSizeFor(double value) {
   double linewidth = Math.max(1, visualFlowMap.getModel().getMaxEdgeWidth());
   double normAbsValue = Math.abs(normalizeForWidthScale(value));
   if (Double.isNaN(normAbsValue)) {
     return 0;
   }
   double avgLen = visualFlowMap.getStats().getEdgeLengthStats().getAvg();
   return avgLen / MAX_EDGE_WIDTH * linewidth * normAbsValue;
 }
Exemple #3
0
 private double normalizeForColorScale(double value) {
   return visualFlowMap.getModel().normalizeForColorScale(value);
 }