@Component(value="ui_HtmlAttributes") public class HtmlAttributesImpl extends java.lang.Object implements HtmlAttributes
HtmlAttributes.CSS, HtmlAttributes.DOM
NAME
Constructor and Description |
---|
HtmlAttributesImpl() |
Modifier and Type | Method and Description |
---|---|
void |
applyCss(Component component,
java.lang.String css)
Apply CSS properties from CSS string;
|
void |
applyCss(Component component,
java.lang.String querySelector,
java.lang.String css)
Apply CSS properties from CSS string;
|
java.lang.String |
getCssProperty(Component component,
java.lang.String propertyName)
Gets CSS property value assigned using
HtmlAttributes . |
java.lang.String |
getCssProperty(Component component,
java.lang.String querySelector,
java.lang.String propertyName)
Gets CSS property value assigned using
HtmlAttributes . |
java.lang.String |
getDomAttribute(Component component,
java.lang.String attributeName)
Gets DOM attribute value assigned using
HtmlAttributes . |
java.lang.String |
getDomAttribute(Component component,
java.lang.String querySelector,
java.lang.String attributeName)
Gets DOM attribute value assigned using
HtmlAttributes . |
void |
removeCssProperty(Component component,
java.lang.String propertyName)
Clears CSS property value from the top most element of UI component.
|
void |
removeCssProperty(Component component,
java.lang.String querySelector,
java.lang.String propertyName)
Clears CSS property value for all nested elements of UI component corresponding to the given query selector.
|
void |
removeDomAttribute(Component component,
java.lang.String attributeName)
Removes DOM attribute from the top most element of UI component.
|
void |
removeDomAttribute(Component component,
java.lang.String querySelector,
java.lang.String attributeName)
Removes DOM attribute for all nested elements of UI component corresponding to the given query selector.
|
void |
setCssProperty(Component component,
java.lang.String propertyName,
java.lang.String value)
Sets CSS property value on the top most element of UI component.
|
void |
setCssProperty(Component component,
java.lang.String querySelector,
java.lang.String propertyName,
java.lang.String value)
Sets CSS property value for all nested elements of UI component corresponding to the given query selector.
|
void |
setDomAttribute(Component component,
java.lang.String attributeName,
java.lang.String value)
Sets DOM attribute on the top most element of UI component.
|
void |
setDomAttribute(Component component,
java.lang.String querySelector,
java.lang.String attributeName,
java.lang.String value)
Sets DOM attribute for all nested elements of UI component corresponding to the given query selector.
|
public void setDomAttribute(Component component, java.lang.String attributeName, java.lang.String value)
HtmlAttributes
setDomAttribute
in interface HtmlAttributes
component
- UI componentattributeName
- DOM attribute name, e.g. "title"value
- attribute valueHtmlAttributes.DOM
,
HtmlAttributes.setDomAttribute(Component, String, String, String)
public void setDomAttribute(Component component, java.lang.String querySelector, java.lang.String attributeName, java.lang.String value)
HtmlAttributes
setDomAttribute
in interface HtmlAttributes
component
- UI componentquerySelector
- a string containing one or more selectors to match.
This string must be a valid CSS selector stringattributeName
- DOM attribute name, e.g. "title"value
- attribute valueHtmlAttributes.DOM
,
HtmlAttributes.setDomAttribute(Component, String, String)
,
Selectors API@Nullable public java.lang.String getDomAttribute(Component component, java.lang.String attributeName)
HtmlAttributes
HtmlAttributes
. Does not reflect a real value from DOM.getDomAttribute
in interface HtmlAttributes
component
- UI componentattributeName
- DOM attribute nameHtmlAttributes.getDomAttribute(Component, String, String)
@Nullable public java.lang.String getDomAttribute(Component component, java.lang.String querySelector, java.lang.String attributeName)
HtmlAttributes
HtmlAttributes
. Does not reflect a real value from DOM.getDomAttribute
in interface HtmlAttributes
component
- UI componentquerySelector
- a string containing one or more selectors to match.
This string must be a valid CSS selector stringattributeName
- DOM attribute nameHtmlAttributes.getDomAttribute(Component, String)
public void removeDomAttribute(Component component, java.lang.String attributeName)
HtmlAttributes
removeDomAttribute
in interface HtmlAttributes
component
- UI componentattributeName
- DOM attribute nameHtmlAttributes.removeDomAttribute(Component, String, String)
public void removeDomAttribute(Component component, java.lang.String querySelector, java.lang.String attributeName)
HtmlAttributes
removeDomAttribute
in interface HtmlAttributes
component
- UI componentquerySelector
- a string containing one or more selectors to match.
This string must be a valid CSS selector stringattributeName
- DOM attribute nameHtmlAttributes.removeDomAttribute(Component, String)
,
Selectors APIpublic void setCssProperty(Component component, java.lang.String propertyName, java.lang.String value)
HtmlAttributes
setCssProperty
in interface HtmlAttributes
component
- UI componentpropertyName
- CSS property name, e.g. "border-color"value
- property valueHtmlAttributes.CSS
,
HtmlAttributes.setCssProperty(Component, String, String, String)
public void setCssProperty(Component component, java.lang.String querySelector, java.lang.String propertyName, java.lang.String value)
HtmlAttributes
setCssProperty
in interface HtmlAttributes
component
- UI componentquerySelector
- a string containing one or more selectors to match.
This string must be a valid CSS selector stringpropertyName
- CSS property name, e.g. "border-color"value
- property valueHtmlAttributes.CSS
,
HtmlAttributes.setCssProperty(Component, String, String)
,
Selectors API@Nullable public java.lang.String getCssProperty(Component component, java.lang.String propertyName)
HtmlAttributes
HtmlAttributes
. Does not reflect a real value from DOM.getCssProperty
in interface HtmlAttributes
component
- UI componentpropertyName
- CSS property nameHtmlAttributes.getCssProperty(Component, String, String)
@Nullable public java.lang.String getCssProperty(Component component, java.lang.String querySelector, java.lang.String propertyName)
HtmlAttributes
HtmlAttributes
. Does not reflect a real value from DOM.getCssProperty
in interface HtmlAttributes
component
- UI componentquerySelector
- a string containing one or more selectors to match.
This string must be a valid CSS selector stringpropertyName
- CSS property nameHtmlAttributes.getCssProperty(Component, String)
public void removeCssProperty(Component component, java.lang.String propertyName)
HtmlAttributes
removeCssProperty
in interface HtmlAttributes
component
- UI componentpropertyName
- CSS property nameHtmlAttributes.removeCssProperty(Component, String, String)
public void removeCssProperty(Component component, java.lang.String querySelector, java.lang.String propertyName)
HtmlAttributes
removeCssProperty
in interface HtmlAttributes
component
- UI componentquerySelector
- a string containing one or more selectors to match.
This string must be a valid CSS selector stringpropertyName
- CSS property nameHtmlAttributes.removeCssProperty(Component, String)
,
Selectors APIpublic void applyCss(Component component, java.lang.String css)
HtmlAttributes
applyCss
in interface HtmlAttributes
component
- UI componentcss
- CSS stringHtmlAttributes.applyCss(Component, String, String)
public void applyCss(Component component, java.lang.String querySelector, java.lang.String css)
HtmlAttributes
applyCss
in interface HtmlAttributes
component
- UI componentquerySelector
- a string containing one or more selectors to match.
This string must be a valid CSS selector stringcss
- CSS stringHtmlAttributes.applyCss(Component, String)