Class Icon
java.lang.Object
com.webfirmframework.wffweb.css.core.AbstractCssProperty<Icon>
com.webfirmframework.wffweb.css.css3.Icon
- All Implemented Interfaces:
CssProperty
,StateChangeInformer<Bean>
,Serializable
,Cloneable
icon: auto|<i>URL<i>|initial|inherit;
The icon property provides the author the ability to style an element with an iconic equivalent.
Note: An element's icon is not used unless the "content" property is set to the value "icon"!
Default value: auto
Inherited: no
Animatable: no
Version: CSS3
JavaScript syntax: object.style.icon="url(image.png)"
- Since:
- 1.0.0
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
setCssValue
(String cssValue) void
setImageUrls
(UrlCss3Value... urlCss3Values) void
setImageUrls
(String... imageUrls) sample code :-icon.setImageUrls("Test.gif", "TestImage.png")
createsbackground-image: url("Test.gif"), url("TestImage.png");
.void
stateChanged
(Bean stateChangedObject) toString()
Methods inherited from class com.webfirmframework.wffweb.css.core.AbstractCssProperty
clone, getStateChangeInformer, isAlreadyInUse, setAlreadyInUse, setStateChangeInformer, toCssString
-
Field Details
-
INITIAL
- See Also:
-
INHERIT
- See Also:
-
NONE
- See Also:
-
-
Constructor Details
-
Icon
public Icon()the default value isnone
- Since:
- 1.0.0
-
Icon
- Parameters:
cssValue
- the cssValue to set.
eg:-url(images/BackgroundDesign.png)
-
Icon
- Parameters:
icon
- theIcon
object from which the cssName and cssValue to set.
-
Icon
sample code :-new Icon("Test.gif", "TestImage.png")
createsbackground-image: url("Test.gif"), url("TestImage.png");
. For css3 syntax method please usenew Icon(UrlCss3Value... urlCss3Values)
orsetImageUrls(UrlCss3Value... urlCss3Values)
method.- Parameters:
imageUrls
- an array of icon urls, eg:-icon.setImageUrls("Test.gif", "TestImage.png")
and the generated css will bebackground-image: url("Test.gif"), url("TestImage.png");
- Since:
- 1.0.0
-
Icon
- Parameters:
urlCss3Values
- an array ofUrlCss3Value
objects.
-
-
Method Details
-
getCssName
- Specified by:
getCssName
in interfaceCssProperty
- Returns:
- the name portion in style, eg
align-content
for stylealign-content: center
.
-
getCssValue
- Specified by:
getCssValue
in interfaceCssProperty
- Returns:
- the value portion in style, eg
center
for stylealign-content: center
.
-
toString
-
setCssValue
- Specified by:
setCssValue
in classAbstractCssProperty<Icon>
- Parameters:
cssValue
-null
is considered as an invalid value.- Returns:
- the current object.
- Since:
- 1.0.0
-
setImageUrls
sample code :-icon.setImageUrls("Test.gif", "TestImage.png")
createsbackground-image: url("Test.gif"), url("TestImage.png");
. For css3 syntax method please usesetImageUrls(UrlCss3Value... urlCss3Values)
method.- Parameters:
imageUrls
- an array of icon urls, eg:-icon.setImageUrls("Test.gif", "TestImage.png")
and the generated css will bebackground-image: url("Test.gif"), url("TestImage.png");
- Since:
- 1.0.0
-
setImageUrls
- Parameters:
urlCss3Values
- urlCss3Values an array ofUrlCss3Value
objects.- Since:
- 1.0.0
-
getUrlCss3Values
- Returns:
- a new object of unmodifiable
List<UrlCss3Value>
whenever this method is called. Or null. - Since:
- 1.0.0
-
setAsInitial
public void setAsInitial()- Since:
- 1.0.0
-
setAsInherit
public void setAsInherit()- Since:
- 1.0.0
-
stateChanged
- Specified by:
stateChanged
in interfaceStateChangeInformer<Bean>
-