class VerticalStackLayoutManager extends AbstractNestedLayoutHandler {

    @Override
    public void layout(final WiresContainer container) {
        double y = PADDING_Y;

        if (container instanceof WiresShape) {
            y = y + ((WiresShape) container).getPath().getBoundingBox().getHeight();
        }

        for (WiresShape ws : container.getChildShapes()) {
            ws.setLocation(new Point2D(PADDING_X,
                                       y));
            y = y + getTotalHeight(ws) + PADDING_Y;
        }
    }

}