@Override
protected void update(final IGroup shape) {
if(shape.isInteriorStylable()) {
final FillingStyle style = shape.getFillingStyle();
final boolean isFillable = style.isFilled();
final boolean hatchings = style.isHatchings();
final boolean gradient = style.isGradient();
// Updating the visibility of the widgets.
composer.setWidgetVisible(fillColButton, isFillable);
composer.setWidgetVisible(hatchColButton, hatchings);
composer.setWidgetVisible(hatchAngleField, hatchings);
composer.setWidgetVisible(hatchSepField, hatchings);
composer.setWidgetVisible(hatchWidthField, hatchings);
composer.setWidgetVisible(gradStartColButton, gradient);
composer.setWidgetVisible(gradEndColButton, gradient);
composer.setWidgetVisible(gradAngleField, gradient);
composer.setWidgetVisible(gradMidPtField, gradient);
fillStyleCB.setSelectedItemSafely(style.toString());
if(isFillable)
fillColButton.setColor(shape.getFillingCol());
if(hatchings) {
hatchColButton.setColor(shape.getHatchingsCol());
hatchAngleField.setValueSafely(Math.toDegrees(shape.getHatchingsAngle()));