Search in sources :

Example 1 with NodeList

use of org.eclipse.draw2d.graph.NodeList in project cubrid-manager by CUBRID.

the class ERMinJoinDirectedGraphLayout method getLayoutedRec.

public Rectangle getLayoutedRec() {
    NodeList nodes = joinDirectedGraph.getNodes();
    Rectangle fullRec = new Rectangle(0, 0, 0, 0);
    Iterator it = nodes.iterator();
    while (it.hasNext()) {
        ERTableNode node = (ERTableNode) it.next();
        LayoutUtil.unionAndExpand(fullRec, node.getRectangle());
    }
    return fullRec;
}
Also used : NodeList(org.eclipse.draw2d.graph.NodeList) Rectangle(org.eclipse.draw2d.geometry.Rectangle) Iterator(java.util.Iterator)

Example 2 with NodeList

use of org.eclipse.draw2d.graph.NodeList in project cubrid-manager by CUBRID.

the class ERMinJoinDirectedGraphLayout method adjust.

public void adjust(int offsetX, int offsetY) {
    if (offsetX == 0 && offsetY == 0) {
        return;
    }
    NodeList nodes = joinDirectedGraph.getNodes();
    Iterator it = nodes.iterator();
    it = nodes.iterator();
    while (it.hasNext()) {
        ERTableNode node = (ERTableNode) it.next();
        node.setXoffset(offsetX);
        node.setYoffset(offsetY);
    }
}
Also used : NodeList(org.eclipse.draw2d.graph.NodeList) Iterator(java.util.Iterator)

Aggregations

Iterator (java.util.Iterator)2 NodeList (org.eclipse.draw2d.graph.NodeList)2 Rectangle (org.eclipse.draw2d.geometry.Rectangle)1