} else if (IMAGE_ID_STATE_ICON.equals(imageId)) {
return getStateIcon((ToggleButton) component);
} else if (IMAGE_ID_SELECTED_STATE_ICON.equals(imageId)) {
return getSelectedStateIcon((ToggleButton) component);
} else if (IMAGE_ID_BACKGROUND.equals(imageId)) {
FillImage backgroundImage;
if (component.isRenderEnabled()) {
backgroundImage = (FillImage) component.getRenderProperty(AbstractButton.PROPERTY_BACKGROUND_IMAGE);
} else {
backgroundImage = (FillImage) component.getRenderProperty(AbstractButton.PROPERTY_DISABLED_BACKGROUND_IMAGE);
if (backgroundImage == null) {
backgroundImage = (FillImage) component.getRenderProperty(AbstractButton.PROPERTY_BACKGROUND_IMAGE);
}
}
if (backgroundImage == null) {
return null;
} else {
return backgroundImage.getImage();
}
} else if (IMAGE_ID_ROLLOVER_BACKGROUND.equals(imageId)) {
FillImage backgroundImage
= (FillImage) component.getRenderProperty(AbstractButton.PROPERTY_ROLLOVER_BACKGROUND_IMAGE);
if (backgroundImage == null) {
return null;
} else {
return backgroundImage.getImage();
}
} else if (IMAGE_ID_PRESSED_BACKGROUND.equals(imageId)) {
FillImage backgroundImage
= (FillImage) component.getRenderProperty(AbstractButton.PROPERTY_PRESSED_BACKGROUND_IMAGE);
if (backgroundImage == null) {
return null;
} else {
return backgroundImage.getImage();
}
} else if (IMAGE_ID_ROLLOVER_STATE_ICON.equals(imageId)) {
ImageReference icon = (ImageReference) component.getRenderProperty(ToggleButton.PROPERTY_ROLLOVER_STATE_ICON);
return icon == null ? getStateIcon((ToggleButton) component) : icon;
} else if (IMAGE_ID_ROLLOVER_SELECTED_STATE_ICON.equals(imageId)) {