while (itr.hasNext())
{
NodeModel node = (NodeModel) itr.next();
Point locAbs = node.getLocationAbs();
Dimension size = node.getSize();
nodeTop = locAbs.y;
nodeLeft = locAbs.x;
nodeRight = locAbs.x + size.width;
nodeBottom = locAbs.y + size.height;
if (top > nodeTop)
{
top = nodeTop;
}
if (left > nodeLeft)
{
left = nodeLeft;
}
if (right < nodeRight)
{
right = nodeRight;
}
if (bottom < nodeBottom)
{
bottom = nodeBottom;
}
}
// Checks the bendpoints' locations.
if (this.isRoot)
{
itr = this.getEdges().iterator();
}
else
{
itr = this.getEdgeIterator(ALL_EDGES, true, true);
}
while (itr.hasNext())
{
EdgeModel edge = (EdgeModel) itr.next();
edge.updateBendpoints();
for (int i = 0; i < edge.bendpoints.size(); i++)
{
EdgeBendpoint eb = (EdgeBendpoint) edge.bendpoints.get(i);
Point loc = eb.getLocationFromModel(edge);
int x = loc.x;
int y = loc.y;
if (top > y)