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);
}
} else if (!obj.isValid()) {
engine.addObject(AbstractEngine.CLASS_EDGE, obj);
if (!undirected && vizConfig.isShowArrows() && !edge.isSelfLoop()) {
Arrow2dModel arrowObj = obj.getArrow();
engine.addObject(AbstractEngine.CLASS_ARROW, arrowObj);
arrowObj.setCacheMarker(cacheMarker);
arrowObj.setWeight(weight);
}
} else {
if (!undirected && vizConfig.isShowArrows() && !edge.isSelfLoop() && edge.isDirected()) {
Arrow2dModel arrowObj = obj.getArrow();
arrowObj.setCacheMarker(cacheMarker);
arrowObj.setWeight(weight);
}
}
obj.setWeight(weight);
obj.setCacheMarker(cacheMarker);
}