}
// create shadows
for (int shindex = 0; shindex < shadowGroups.size(); shindex++) {
Sprite shadowBarAttr = shadowAttributes.get(shindex);
SpriteList<Sprite> shadows = shadowGroups.get(shindex);
final RectangleSprite shadowSprite;
RectangleSprite rect = rects.get(i);
if (i < shadows.size()) {
shadowSprite = (RectangleSprite) shadows.get(i);
shadowSprite.setHidden(false);
} else {
shadowSprite = new RectangleSprite();
if (column) {
shadowSprite.setX(rect.getX());
shadowSprite.setY(rect.getY() + rect.getHeight());
shadowSprite.setWidth(rect.getWidth());
shadowSprite.setHeight(0);
} else {
shadowSprite.setX(rect.getX());
shadowSprite.setY(rect.getY());
shadowSprite.setWidth(0);
shadowSprite.setHeight(rect.getHeight());
}
shadowSprite.setStrokeWidth(shadowBarAttr.getStrokeWidth());
shadowSprite.setStrokeOpacity(shadowBarAttr.getStrokeOpacity());
shadowSprite.setStroke(shadowBarAttr.getStroke());
shadowSprite.setFill(Color.NONE);
shadowSprite.setTranslation(new Translation(shadowBarAttr.getTranslation()));
shadows.add(shadowSprite);
chart.addSprite(shadowSprite);
}
if (chart.isAnimated() && chart.isResizing()) {
if (column) {
shadowSprite.setX(rect.getX());
shadowSprite.setY(rect.getY() + rect.getHeight());
shadowSprite.setWidth(rect.getWidth());
shadowSprite.setHeight(0);
} else {
shadowSprite.setX(rect.getX());
shadowSprite.setY(rect.getY());
shadowSprite.setWidth(0);
shadowSprite.setHeight(rect.getHeight());
}
}
if (chart.isAnimated() && !Double.isNaN(shadowSprite.getHeight()) && !Double.isNaN(shadowSprite.getWidth())) {
DrawFx.createRectangleAnimator(shadowSprite, rect.toRectangle()).run(chart.getAnimationDuration(),
chart.getAnimationEasing());
} else {
shadowSprite.setX(rect.getX());
shadowSprite.setY(rect.getY());
shadowSprite.setWidth(rect.getWidth());
shadowSprite.setHeight(rect.getHeight());
shadowSprite.redraw();
}
if (shadowRenderer != null) {
shadowRenderer.spriteRenderer(shadowSprite, i, chart.getCurrentStore());
}