Package org.opencms.gwt.client.util
Class CmsStyleVariable
- java.lang.Object
-
- org.opencms.gwt.client.util.CmsStyleVariable
-
public class CmsStyleVariable extends java.lang.Object
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
Constructors Constructor Description CmsStyleVariable(com.google.gwt.user.client.ui.UIObject... uis)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getValue()
Returns the current style value.void
setValue(java.lang.String newStyle)
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.
-
-
-
Constructor Detail
-
CmsStyleVariable
public CmsStyleVariable(com.google.gwt.user.client.ui.UIObject... uis)
Creates a new instance.- Parameters:
uis
- the list of UI objects to associate with this style variable
-
-
Method Detail
-
getValue
public java.lang.String getValue()
Returns the current style value.- Returns:
- the current style value, or
null
if non is set
-
setValue
public void setValue(java.lang.String newStyle)
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
-
-