public class StyleAttributeHandler extends CustomAttribute
style
attribute by delegating to
Element.getStyle()
.
For internal use only. May be renamed or removed in a future release.
Constructor and Description |
---|
StyleAttributeHandler() |
Modifier and Type | Method and Description |
---|---|
String |
getAttribute(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. |
get, getNames
public boolean hasAttribute(Element element)
CustomAttribute
Element.hasAttribute(String)
should return for this
attribute.hasAttribute
in class CustomAttribute
element
- the element to check, not null
true
if the element has a value for this attribute,
otherwise false
public String getAttribute(Element element)
CustomAttribute
Element.getAttribute(String)
for this attribute.getAttribute
in class CustomAttribute
element
- the element to check, not null
public void setAttribute(Element element, String attributeValue)
CustomAttribute
Element.setAttribute(String, String)
is
called for this attribute.setAttribute
in class CustomAttribute
element
- the element for which to set the value, not null
attributeValue
- the new attribute value, not null
public static LinkedHashMap<String,String> parseStyles(String styleString)
styleString
- the string to parsepublic void removeAttribute(Element element)
CustomAttribute
Element.removeAttribute(String)
is
called for this attribute.removeAttribute
in class CustomAttribute
element
- the element for which to remove the attribute, not
null
Copyright © 2022. All rights reserved.