Package com.vaadin.flow.dom.impl
Class ClassAttributeHandler
- java.lang.Object
-
- com.vaadin.flow.dom.impl.CustomAttribute
-
- com.vaadin.flow.dom.impl.ClassAttributeHandler
-
- All Implemented Interfaces:
Serializable
public class ClassAttributeHandler extends CustomAttribute
Emulates theclassattribute by delegating toElement.getClassList().For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClassAttributeHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAttribute(Element element)Gets the value that should be returned byElement.getAttribute(String)for this attribute.booleanhasAttribute(Element element)Checks whatElement.hasAttribute(String)should return for this attribute.voidremoveAttribute(Element element)Removes the attribute whenElement.removeAttribute(String)is called for this attribute.voidsetAttribute(Element element, String value)Sets the value whenElement.setAttribute(String, String)is called for this attribute.-
Methods inherited from class com.vaadin.flow.dom.impl.CustomAttribute
get, getNames
-
-
-
-
Method Detail
-
hasAttribute
public boolean hasAttribute(Element element)
Description copied from class:CustomAttributeChecks whatElement.hasAttribute(String)should return for this attribute.- Specified by:
hasAttributein classCustomAttribute- Parameters:
element- the element to check, notnull- Returns:
trueif the element has a value for this attribute, otherwisefalse
-
getAttribute
public String getAttribute(Element element)
Description copied from class:CustomAttributeGets the value that should be returned byElement.getAttribute(String)for this attribute.- Specified by:
getAttributein classCustomAttribute- Parameters:
element- the element to check, notnull- Returns:
- the attribute value
-
setAttribute
public void setAttribute(Element element, String value)
Description copied from class:CustomAttributeSets the value whenElement.setAttribute(String, String)is called for this attribute.- Specified by:
setAttributein classCustomAttribute- Parameters:
element- the element for which to set the value, notnullvalue- the new attribute value, notnull
-
removeAttribute
public void removeAttribute(Element element)
Description copied from class:CustomAttributeRemoves the attribute whenElement.removeAttribute(String)is called for this attribute.- Specified by:
removeAttributein classCustomAttribute- Parameters:
element- the element for which to remove the attribute, notnull
-
-