com.vaadin.flow.dom.impl.
Class StyleAttributeHandler
All Implemented Interfaces:
Emulates the style
attribute by delegating to
Element.getStyle()
.
For internal use only. May be renamed or removed in a future release.
Since:
1.0
See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(Element element) Gets the value that should be returned by
Element.getAttribute(String)
for this attribute.boolean
hasAttribute
(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.
void
removeAttribute
(Element element) Removes the attribute when
Element.removeAttribute(String)
is called for this attribute.void
setAttribute
(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
-
Constructor Details
-
StyleAttributeHandler
public StyleAttributeHandler()
-
-
Method Details
-
hasAttribute
Description copied from class:
CustomAttribute
Checks what
Element.hasAttribute(String)
should return for this attribute.Specified by:
hasAttribute
in classCustomAttribute
Parameters:
element
- the element to check, notnull
Returns:
true
if the element has a value for this attribute, otherwisefalse
-
getAttribute
Description copied from class:
CustomAttribute
Gets the value that should be returned by
Element.getAttribute(String)
for this attribute.Specified by:
getAttribute
in classCustomAttribute
Parameters:
element
- the element to check, notnull
Returns:
the attribute value
-
setAttribute
Description copied from class:
CustomAttribute
Sets the value when
Element.setAttribute(String, String)
is called for this attribute.Specified by:
setAttribute
in classCustomAttribute
Parameters:
element
- the element for which to set the value, notnull
attributeValue
- the new attribute value, notnull
-
parseStyles
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
Description copied from class:
CustomAttribute
Removes the attribute when
Element.removeAttribute(String)
is called for this attribute.Specified by:
removeAttribute
in classCustomAttribute
Parameters:
element
- the element for which to remove the attribute, notnull
-