Package org.opencms.gwt.client.util
Class CmsStyleVariable
java.lang.Object
org.opencms.gwt.client.util.CmsStyleVariable
This is a helper class for changing GWT UIObjects' styles between a set of given values.
Every time a new value is set, the previous value of the style variable will be removed from all associated UI objects, and the new style name will be added.
- Since:
- 8.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionCmsStyleVariable
(com.google.gwt.user.client.ui.UIObject... uis) Creates a new instance. -
Method Summary
-
Constructor Details
-
CmsStyleVariable
Creates a new instance.- Parameters:
uis
- the list of UI objects to associate with this style variable
-
-
Method Details
-
getValue
Returns the current style value.- Returns:
- the current style value, or
null
if non is set
-
setValue
Removes the previous value of the style variable from all associated ui objects and adds the new value as a style name to all of them.- Parameters:
newStyle
- the new style name
-