Package io.jmix.ui.component
Interface HtmlAttributes
- All Known Implementing Classes:
HtmlAttributesImpl
public interface HtmlAttributes
Sets DOM and CSS attributes to UI component widgets.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
Common CSS property names.static final class
Common DOM attribute names. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Apply CSS properties from CSS string;void
Apply CSS properties from CSS string;getCssProperty
(Component component, String propertyName) Gets CSS property value assigned usingHtmlAttributes
.getCssProperty
(Component component, String querySelector, String propertyName) Gets CSS property value assigned usingHtmlAttributes
.getDomAttribute
(Component component, String attributeName) Gets DOM attribute value assigned usingHtmlAttributes
.getDomAttribute
(Component component, String querySelector, String attributeName) Gets DOM attribute value assigned usingHtmlAttributes
.void
removeCssProperty
(Component component, String propertyName) Clears CSS property value from the top most element of UI component.void
removeCssProperty
(Component component, String querySelector, String propertyName) Clears CSS property value for all nested elements of UI component corresponding to the given query selector.void
removeDomAttribute
(Component component, String attributeName) Removes DOM attribute from the top most element of UI component.void
removeDomAttribute
(Component component, String querySelector, String attributeName) Removes DOM attribute for all nested elements of UI component corresponding to the given query selector.void
setCssProperty
(Component component, String propertyName, String value) Sets CSS property value on the top most element of UI component.void
setCssProperty
(Component component, String querySelector, String propertyName, String value) Sets CSS property value for all nested elements of UI component corresponding to the given query selector.void
setDomAttribute
(Component component, String attributeName, String value) Sets DOM attribute on the top most element of UI component.void
setDomAttribute
(Component component, String querySelector, String attributeName, String value) Sets DOM attribute for all nested elements of UI component corresponding to the given query selector.
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
setDomAttribute
Sets DOM attribute on the top most element of UI component.- Parameters:
component
- UI componentattributeName
- DOM attribute name, e.g. "title"value
- attribute value- See Also:
-
setDomAttribute
Sets DOM attribute for all nested elements of UI component corresponding to the given query selector.- Parameters:
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 value- See Also:
-
getDomAttribute
Gets DOM attribute value assigned usingHtmlAttributes
. Does not reflect a real value from DOM.- Parameters:
component
- UI componentattributeName
- DOM attribute name- Returns:
- previously assigned DOM attribute value
- See Also:
-
getDomAttribute
Gets DOM attribute value assigned usingHtmlAttributes
. Does not reflect a real value from DOM.- Parameters:
component
- UI componentquerySelector
- a string containing one or more selectors to match. This string must be a valid CSS selector stringattributeName
- DOM attribute name- Returns:
- previously assigned DOM attribute value
- See Also:
-
removeDomAttribute
Removes DOM attribute from the top most element of UI component.- Parameters:
component
- UI componentattributeName
- DOM attribute name- See Also:
-
removeDomAttribute
Removes DOM attribute for all nested elements of UI component corresponding to the given query selector.- Parameters:
component
- UI componentquerySelector
- a string containing one or more selectors to match. This string must be a valid CSS selector stringattributeName
- DOM attribute name- See Also:
-
setCssProperty
Sets CSS property value on the top most element of UI component.- Parameters:
component
- UI componentpropertyName
- CSS property name, e.g. "border-color"value
- property value- See Also:
-
setCssProperty
Sets CSS property value for all nested elements of UI component corresponding to the given query selector.- Parameters:
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 value- See Also:
-
getCssProperty
Gets CSS property value assigned usingHtmlAttributes
. Does not reflect a real value from DOM.- Parameters:
component
- UI componentpropertyName
- CSS property name- Returns:
- previously assigned CSS property value
- See Also:
-
getCssProperty
Gets CSS property value assigned usingHtmlAttributes
. Does not reflect a real value from DOM.- Parameters:
component
- UI componentquerySelector
- a string containing one or more selectors to match. This string must be a valid CSS selector stringpropertyName
- CSS property name- Returns:
- previously assigned CSS property value
- See Also:
-
removeCssProperty
Clears CSS property value from the top most element of UI component.- Parameters:
component
- UI componentpropertyName
- CSS property name- See Also:
-
removeCssProperty
Clears CSS property value for all nested elements of UI component corresponding to the given query selector.- Parameters:
component
- UI componentquerySelector
- a string containing one or more selectors to match. This string must be a valid CSS selector stringpropertyName
- CSS property name- See Also:
-
applyCss
Apply CSS properties from CSS string;- Parameters:
component
- UI componentcss
- CSS string- See Also:
-
applyCss
Apply CSS properties from CSS string;- Parameters:
component
- UI componentquerySelector
- a string containing one or more selectors to match. This string must be a valid CSS selector stringcss
- CSS string- See Also:
-