public interface BackgroundStyleProperties
BackgroundStyleProperties
interface represents common background styling properties. It is used wherever a background
can be styled.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBackgroundColor()
Background color.
|
java.lang.String |
getBackgroundImage()
URL of the background image.
|
java.lang.String |
getBackgroundImagePosition()
Background image position.
|
java.lang.String |
getBackgroundImageRepeat()
Background image repeat property.
|
void |
setBackgroundColor(java.lang.String backgroundColor)
Sets the background color, this is equivalent to the CSS background-color property and any valid value for this CSS property can be used.
|
void |
setBackgroundImage(java.lang.String backgroundImage)
Sets the URL of the background image.
|
void |
setBackgroundImagePosition(java.lang.String backgroundImagePosition)
Sets the background image position.
|
void |
setBackgroundImageRepeat(java.lang.String backgroundImageRepeat)
Sets the background image repeat property.
|
java.lang.String getBackgroundColor()
setBackgroundColor(String)
void setBackgroundColor(java.lang.String backgroundColor)
null
removes any configured value.
Examples:
controls.PANEL1.backgroundColor = "#808080"; controls.TEXT1.setBackgroundColor("yellow");
java.lang.String getBackgroundImage()
setBackgroundImage(String)
void setBackgroundImage(java.lang.String backgroundImage)
A URL can be either absolute or relative.
controls.PANEL1.backgroundImage = "http://www.ebasetech.com/images/logo.gif"; controls.PANEL1.setBackgroundImage("images/logo.gif");
java.lang.String getBackgroundImagePosition()
setBackgroundImagePosition(String)
void setBackgroundImagePosition(java.lang.String backgroundImagePosition)
Supported values:
Value | Constant |
---|---|
Top Center | ControlConstants.IMAGE_POSITION_TOP_CENTER |
Top Left | ControlConstants.IMAGE_POSITION_TOP_LEFT |
Top Right | ControlConstants.IMAGE_POSITION_TOP_RIGHT |
Center Center | ControlConstants.IMAGE_POSITION_CENTER_CENTER |
Center Left | ControlConstants.IMAGE_POSITION_CENTER_LEFT |
Center Right | ControlConstants.IMAGE_POSITION_CENTER_RIGHT |
Bottom Center | ControlConstants.IMAGE_POSITION_BOTTOM_CENTER |
Bottom Left | ControlConstants.IMAGE_POSITION_BOTTOM_LEFT |
Bottom Right | ControlConstants.IMAGE_POSITION_BOTTOM_RIGHT |
Setting a value of null
removes any existing value for the property.
Examples:
controls.PANEL1.backgroundImagePosition = ControlConstants.IMAGE_POSITION_BOTTOM_RIGHT; controls.PANEL1.setBackgroundImagePosition(ControlConstants.IMAGE_POSITION_CENTER_CENTER);
java.lang.String getBackgroundImageRepeat()
setBackgroundImageRepeat(String)
void setBackgroundImageRepeat(java.lang.String backgroundImageRepeat)
Supported values:
Value | Constant |
---|---|
no-repeat | ControlConstants.IMAGE_NO_REPEAT |
repeat | ControlConstants.IMAGE_REPEAT |
repeat-x | ControlConstants.IMAGE_REPEAT-X |
repeat-y | ControlConstants.IMAGE_REPEAT-Y |
Setting a value of null
removes any existing value for the property.
Examples:
controls.PANEL1.backgroundImageRepeat = ControlConstants.IMAGE_REPEAT; controls.PANEL1.setBackgroundImagePosition(ControlConstants.IMAGE_REPEAT-X);