Package io.jmix.ui.component.impl
Class HtmlAttributesImpl
java.lang.Object
io.jmix.ui.component.impl.HtmlAttributesImpl
- All Implemented Interfaces:
HtmlAttributes
@Component("ui_HtmlAttributes")
public class HtmlAttributesImpl
extends Object
implements HtmlAttributes
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.ui.component.HtmlAttributes
HtmlAttributes.CSS, HtmlAttributes.DOM -
Field Summary
Fields inherited from interface io.jmix.ui.component.HtmlAttributes
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidApply CSS properties from CSS string;voidApply 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.voidremoveCssProperty(Component component, String propertyName) Clears CSS property value from the top most element of UI component.voidremoveCssProperty(Component component, String querySelector, String propertyName) Clears CSS property value for all nested elements of UI component corresponding to the given query selector.voidremoveDomAttribute(Component component, String attributeName) Removes DOM attribute from the top most element of UI component.voidremoveDomAttribute(Component component, String querySelector, String attributeName) Removes DOM attribute for all nested elements of UI component corresponding to the given query selector.voidsetCssProperty(Component component, String propertyName, String value) Sets CSS property value on the top most element of UI component.voidsetCssProperty(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.voidsetDomAttribute(Component component, String attributeName, String value) Sets DOM attribute on the top most element of UI component.voidsetDomAttribute(Component component, String querySelector, String attributeName, String value) Sets DOM attribute for all nested elements of UI component corresponding to the given query selector.
-
Constructor Details
-
HtmlAttributesImpl
public HtmlAttributesImpl()
-
-
Method Details
-
setDomAttribute
Description copied from interface:HtmlAttributesSets DOM attribute on the top most element of UI component.- Specified by:
setDomAttributein interfaceHtmlAttributes- Parameters:
component- UI componentattributeName- DOM attribute name, e.g. "title"value- attribute value- See Also:
-
setDomAttribute
public void setDomAttribute(Component component, String querySelector, String attributeName, String value) Description copied from interface:HtmlAttributesSets DOM attribute for all nested elements of UI component corresponding to the given query selector.- Specified by:
setDomAttributein interfaceHtmlAttributes- 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
Description copied from interface:HtmlAttributesGets DOM attribute value assigned usingHtmlAttributes. Does not reflect a real value from DOM.- Specified by:
getDomAttributein interfaceHtmlAttributes- Parameters:
component- UI componentattributeName- DOM attribute name- Returns:
- previously assigned DOM attribute value
- See Also:
-
getDomAttribute
@Nullable public String getDomAttribute(Component component, String querySelector, String attributeName) Description copied from interface:HtmlAttributesGets DOM attribute value assigned usingHtmlAttributes. Does not reflect a real value from DOM.- Specified by:
getDomAttributein interfaceHtmlAttributes- 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
Description copied from interface:HtmlAttributesRemoves DOM attribute from the top most element of UI component.- Specified by:
removeDomAttributein interfaceHtmlAttributes- Parameters:
component- UI componentattributeName- DOM attribute name- See Also:
-
removeDomAttribute
Description copied from interface:HtmlAttributesRemoves DOM attribute for all nested elements of UI component corresponding to the given query selector.- Specified by:
removeDomAttributein interfaceHtmlAttributes- 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
Description copied from interface:HtmlAttributesSets CSS property value on the top most element of UI component.- Specified by:
setCssPropertyin interfaceHtmlAttributes- Parameters:
component- UI componentpropertyName- CSS property name, e.g. "border-color"value- property value- See Also:
-
setCssProperty
public void setCssProperty(Component component, String querySelector, String propertyName, String value) Description copied from interface:HtmlAttributesSets CSS property value for all nested elements of UI component corresponding to the given query selector.- Specified by:
setCssPropertyin interfaceHtmlAttributes- 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
Description copied from interface:HtmlAttributesGets CSS property value assigned usingHtmlAttributes. Does not reflect a real value from DOM.- Specified by:
getCssPropertyin interfaceHtmlAttributes- Parameters:
component- UI componentpropertyName- CSS property name- Returns:
- previously assigned CSS property value
- See Also:
-
getCssProperty
@Nullable public String getCssProperty(Component component, String querySelector, String propertyName) Description copied from interface:HtmlAttributesGets CSS property value assigned usingHtmlAttributes. Does not reflect a real value from DOM.- Specified by:
getCssPropertyin interfaceHtmlAttributes- 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
Description copied from interface:HtmlAttributesClears CSS property value from the top most element of UI component.- Specified by:
removeCssPropertyin interfaceHtmlAttributes- Parameters:
component- UI componentpropertyName- CSS property name- See Also:
-
removeCssProperty
Description copied from interface:HtmlAttributesClears CSS property value for all nested elements of UI component corresponding to the given query selector.- Specified by:
removeCssPropertyin interfaceHtmlAttributes- 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
Description copied from interface:HtmlAttributesApply CSS properties from CSS string;- Specified by:
applyCssin interfaceHtmlAttributes- Parameters:
component- UI componentcss- CSS string- See Also:
-
applyCss
Description copied from interface:HtmlAttributesApply CSS properties from CSS string;- Specified by:
applyCssin interfaceHtmlAttributes- 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:
-