refreshNodeBounds();
}
private void refreshNodeBounds()
{
Bounds nb = getCastedModel().getNodeBounds();
Dimension minSize = getFigure().getMinimumSize();
Dimension maxSize = getFigure().getMaximumSize();
int width = nb.getWidth();
int height = nb.getHeight();
if (width != -1)
{
width = Math.min(width, maxSize.width);
width = Math.max(width, minSize.width);
}
if (height != -1)
{
height = Math.min(height, maxSize.height);
height = Math.max(height, minSize.height);
}
Rectangle bounds = new Rectangle(nb.getX(), nb.getY(), width, height);
((GraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), bounds);
}