/** * This method sets the property theme for the component. * * @param theme The theme to use. */ public void setTheme(String theme) { Props props = getPage().getPageProperties(); String font = props.getThemeProperty(theme, Props.SUBMIT_IMAGE_FONT_FACE); int fontStyle = props.getThemeIntProperty(theme, Props.SUBMIT_IMAGE_FONT_STYLE); int size = props.getThemeIntProperty(theme, Props.SUBMIT_IMAGE_FONT_SIZE); setFont(font, fontStyle, size); Color c = props.getThemeColorProperty(theme, Props.SUBMIT_IMAGE_TEXT_COLOR); if (c != null) { _textColor = c; } c = props.getThemeColorProperty(theme, Props.SUBMIT_IMAGE_BACKGROUND_COLOR); if (c != null) { _backgroundColor = c; } if (_height == -1) { _height = props.getThemeIntProperty(theme, Props.SUBMIT_IMAGE_DEFAULT_HEIGHT); } c = props.getThemeColorProperty(theme, Props.SUBMIT_IMAGE_TOPLEFT_BORDER_COLOR); if (c != null) { _topLeftBorder = c; } c = props.getThemeColorProperty(theme, Props.SUBMIT_IMAGE_BOTTOMRIGHT_BORDER_COLOR); if (c != null) { _bottomRightBorder = c; } c = props.getThemeColorProperty(theme, Props.SUBMIT_IMAGE_TRANSPARENT_COLOR); if (c != null) { _transparentColor = c; } String style = props.getThemeProperty(theme, Props.SUBMIT_IMAGE_STYLE); if (style != null) { if (style.toUpperCase().equals(STYLE_OVAL)) { _displayStyle = STYLE_OVAL; } else { _displayStyle = STYLE_RECTANGLE; } } _theme = theme; }