com.vaadin.flow.dom.impl.
Class StyleAttributeHandler
- java.lang.Object
 - 
- com.vaadin.flow.dom.impl.CustomAttribute
 - 
- com.vaadin.flow.dom.impl.StyleAttributeHandler
 
 
 
- 
All Implemented Interfaces:
public class StyleAttributeHandler extends CustomAttributeEmulates the
styleattribute by delegating toElement.getStyle().See Also:
 
- 
- 
Constructor Summary
Constructors Constructor and Description StyleAttributeHandler() 
- 
Method Summary
All Methods Modifier and Type Method and Description StringgetAttribute(Element element)Gets the value that should be returned by
Element.getAttribute(String)for this attribute.booleanhasAttribute(Element element)Checks what
Element.hasAttribute(String)should return for this attribute.static LinkedHashMap<String,String>parseStyles(String styleString)Parses the given style string and populates the given style object with the found styles.
voidremoveAttribute(Element element)Removes the attribute when
Element.removeAttribute(String)is called for this attribute.voidsetAttribute(Element element, String attributeValue)Sets the value when
Element.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 what
Element.hasAttribute(String)should return for this attribute.Specified by:
hasAttributein classCustomAttributeParameters:
element- the element to check, notnullReturns:
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 by
Element.getAttribute(String)for this attribute.Specified by:
getAttributein classCustomAttributeParameters:
element- the element to check, notnullReturns:
the attribute value
 
- 
setAttribute
public void setAttribute(Element element, String attributeValue)Description copied from class:
CustomAttributeSets the value when
Element.setAttribute(String, String)is called for this attribute.Specified by:
setAttributein classCustomAttributeParameters:
element- the element for which to set the value, notnullattributeValue- the new attribute value, notnull 
- 
parseStyles
public static LinkedHashMap<String,String> parseStyles(String styleString)Parses the given style string and populates the given style object with the found styles.
Parameters:
styleString- the string to parseReturns:
a map containing the found style rules
 
- 
removeAttribute
public void removeAttribute(Element element)Description copied from class:
CustomAttributeRemoves the attribute when
Element.removeAttribute(String)is called for this attribute.Specified by:
removeAttributein classCustomAttributeParameters:
element- the element for which to remove the attribute, notnull 
 - 
 
 -