public interface HtmlAttributes
HtmlAttributes.CSS,
HtmlAttributes.DOM| Modifier and Type | Interface and Description |
|---|---|
static class |
HtmlAttributes.CSS
Common CSS property names.
|
static class |
HtmlAttributes.DOM
Common DOM attribute names.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
| 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.
|
static final java.lang.String NAME
void setDomAttribute(Component component, java.lang.String attributeName, java.lang.String value)
component - UI componentattributeName - DOM attribute name, e.g. "title"value - attribute valueHtmlAttributes.DOM,
setDomAttribute(Component, String, String, String)void setDomAttribute(Component component, java.lang.String querySelector, java.lang.String attributeName, java.lang.String value)
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,
setDomAttribute(Component, String, String),
Selectors API@Nullable java.lang.String getDomAttribute(Component component, java.lang.String attributeName)
HtmlAttributes. Does not reflect a real value from DOM.component - UI componentattributeName - DOM attribute namegetDomAttribute(Component, String, String)@Nullable java.lang.String getDomAttribute(Component component, java.lang.String querySelector, java.lang.String attributeName)
HtmlAttributes. Does not reflect a real value from DOM.component - UI componentquerySelector - a string containing one or more selectors to match.
This string must be a valid CSS selector stringattributeName - DOM attribute namegetDomAttribute(Component, String)void removeDomAttribute(Component component, java.lang.String attributeName)
component - UI componentattributeName - DOM attribute nameremoveDomAttribute(Component, String, String)void removeDomAttribute(Component component, java.lang.String querySelector, java.lang.String attributeName)
component - UI componentquerySelector - a string containing one or more selectors to match.
This string must be a valid CSS selector stringattributeName - DOM attribute nameremoveDomAttribute(Component, String),
Selectors APIvoid setCssProperty(Component component, java.lang.String propertyName, java.lang.String value)
component - UI componentpropertyName - CSS property name, e.g. "border-color"value - property valueHtmlAttributes.CSS,
setCssProperty(Component, String, String, String)void setCssProperty(Component component, java.lang.String querySelector, java.lang.String propertyName, java.lang.String value)
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,
setCssProperty(Component, String, String),
Selectors API@Nullable java.lang.String getCssProperty(Component component, java.lang.String propertyName)
HtmlAttributes. Does not reflect a real value from DOM.component - UI componentpropertyName - CSS property namegetCssProperty(Component, String, String)@Nullable java.lang.String getCssProperty(Component component, java.lang.String querySelector, java.lang.String propertyName)
HtmlAttributes. Does not reflect a real value from DOM.component - UI componentquerySelector - a string containing one or more selectors to match.
This string must be a valid CSS selector stringpropertyName - CSS property namegetCssProperty(Component, String)void removeCssProperty(Component component, java.lang.String propertyName)
component - UI componentpropertyName - CSS property nameremoveCssProperty(Component, String, String)void removeCssProperty(Component component, java.lang.String querySelector, java.lang.String propertyName)
component - UI componentquerySelector - a string containing one or more selectors to match.
This string must be a valid CSS selector stringpropertyName - CSS property nameremoveCssProperty(Component, String),
Selectors APIvoid applyCss(Component component, java.lang.String css)
component - UI componentcss - CSS stringapplyCss(Component, String, String)void applyCss(Component component, java.lang.String querySelector, java.lang.String css)
component - UI componentquerySelector - a string containing one or more selectors to match.
This string must be a valid CSS selector stringcss - CSS stringapplyCss(Component, String)