limits.setMinWeight(minWeight);
limits.setMaxWeight(maxWeight);
}
public void updateMetaEdges(HierarchicalGraph graph) {
Modeler edgeInit = engine.getModelClasses()[AbstractEngine.CLASS_EDGE].getCurrentModeler();
Modeler arrowInit = engine.getModelClasses()[AbstractEngine.CLASS_ARROW].getCurrentModeler();
float minWeight = Float.POSITIVE_INFINITY;
float maxWeight = Float.NEGATIVE_INFINITY;
TimeInterval timeInterval = DynamicUtilities.getVisibleInterval(dynamicModel);
for (Edge edge : graph.getMetaEdges()) {
if (edge.getSource().getNodeData().getModel() == null || edge.getTarget().getNodeData().getModel() == null) {
continue;
}
float weight = 1f;
if (timeInterval == null) {
weight = edge.getWeight();
} else {
weight = edge.getWeight(timeInterval.getLow(), timeInterval.getHigh());
}
minWeight = Math.min(minWeight, weight);
maxWeight = Math.max(maxWeight, weight);
Edge2dModel obj = (Edge2dModel) edge.getEdgeData().getModel();
if (obj == null) {
//Model is null, ADD
obj = (Edge2dModel) edgeInit.initModel(edge.getEdgeData());
engine.addObject(AbstractEngine.CLASS_EDGE, obj);
if (!undirected && vizConfig.isShowArrows() && !edge.isSelfLoop()) {
Arrow2dModel arrowObj = (Arrow2dModel) arrowInit.initModel(edge.getEdgeData());
engine.addObject(AbstractEngine.CLASS_ARROW, arrowObj);
arrowObj.setCacheMarker(cacheMarker);
arrowObj.setWeight(weight);
obj.setArrow(arrowObj);
}