Search in sources :

Example 1 with BendCursor

use of y.view.BendCursor in project binnavi by google.

the class CNodeMover method moveNode.

public static void moveNode(final AbstractZyGraph<?, ?> graph, final ZyGraphNode<?> node, final double xdist, final double ydist, final Set<Bend> movedBends) {
    graph.getGraph().getRealizer(node.getNode()).moveBy(xdist, ydist);
    for (final EdgeCursor cursor = node.getNode().edges(); cursor.ok(); cursor.next()) {
        final Edge edge = cursor.edge();
        for (final BendCursor bendCursor = graph.getGraph().getRealizer(edge).bends(); bendCursor.ok(); bendCursor.next()) {
            final Bend bend = bendCursor.bend();
            if (movedBends.contains(bend)) {
                continue;
            }
            bend.moveBy(xdist, ydist);
            movedBends.add(bend);
        }
    }
}
Also used : EdgeCursor(y.base.EdgeCursor) BendCursor(y.view.BendCursor) Bend(y.view.Bend) Edge(y.base.Edge)

Aggregations

Edge (y.base.Edge)1 EdgeCursor (y.base.EdgeCursor)1 Bend (y.view.Bend)1 BendCursor (y.view.BendCursor)1