}
@Override
public void render()
{
IFigure figure = new RectangleFigure(this, getResourceCache(), getConfigurationManager());
ShapeLayoutDef layoutDef = getLayout();
for (ShapePresentation childShapePresentation : getChildren())
{
if (!(childShapePresentation instanceof ContainerShapePresentation) &&
!childShapePresentation.part().isActive()) {
childShapePresentation.render();
IFigure childFigure = childShapePresentation.getFigure();
if (childFigure != null)
{
Object layoutConstraint = getLayoutConstraint(childShapePresentation, layoutDef);
if (layoutConstraint != null)
{
figure.add(childFigure, layoutConstraint);
}
else
{
figure.add(childFigure);
}
}
}
if (childShapePresentation instanceof ShapeFactoryPresentation)
{
ShapeFactoryPresentation shapeFactoryPresentation = (ShapeFactoryPresentation)childShapePresentation;
shapeFactoryPresentation.setIndex(figure.getChildren().size());
}
}
setFigure(figure);
}