use of org.cytoscape.ding.EdgeView in project cytoscape-impl by cytoscape.
the class ViewState method apply.
/**
* Applies the recorded state to the view used to create
* this object.
*/
public void apply() {
if (points != null) {
// Use nodes as keys because they are less volatile than views...
for (CyNode n : points.keySet()) {
NodeView nv = view.getDNodeView(n);
Point2D.Double p = points.get(n);
nv.setXPosition(p.getX());
nv.setYPosition(p.getY());
}
}
view.setZoom(scaleFactor);
view.setCenter(center.getX(), center.getY());
view.updateView();
if (anchors != null) {
for (final CyEdge e : anchors.keySet()) {
final EdgeView ev = view.getDEdgeView(e);
// FIXME!
// ev.getBend().setHandles( anchors.get(e) );
ev.setLineCurved(linetype.get(e).intValue());
}
}
}