Class ComponentLoaderUtils

java.lang.Object
io.jmix.flowui.kit.xml.layout.support.ComponentLoaderUtils

public final class ComponentLoaderUtils extends Object
Spring-independent helpers for loading common component attributes from XML elements. Shared by the runtime component loaders in the flowui module and the Studio preview component loaders in flowui-kit.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    loadAlignItems(com.vaadin.flow.component.orderedlayout.FlexComponent component, org.dom4j.Element element)
     
    static void
    loadAutocapitalize(com.vaadin.flow.component.textfield.HasAutocapitalize component, org.dom4j.Element element)
     
    static void
    loadAutocomplete(com.vaadin.flow.component.textfield.HasAutocomplete component, org.dom4j.Element element)
     
    static void
    loadAutocorrect(com.vaadin.flow.component.textfield.HasAutocorrect component, org.dom4j.Element element)
     
    static void
    loadAutofocus(HasAutofocus component, org.dom4j.Element element)
     
    static void
    loadBoxSizing(com.vaadin.flow.component.orderedlayout.ThemableLayout layout, org.dom4j.Element element)
     
    static void
    loadClassNames(com.vaadin.flow.component.HasStyle component, org.dom4j.Element element)
     
    loadDuration(org.dom4j.Element element, String attributeName)
     
    static void
    loadEnabled(com.vaadin.flow.component.HasEnabled component, org.dom4j.Element element)
     
    static void
    loadFlexibleAttributes(com.vaadin.flow.component.orderedlayout.FlexComponent component, org.dom4j.Element element)
     
    static void
    loadHeight(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
     
    static Optional<com.vaadin.flow.component.icon.Icon>
    loadIconSetIcon(org.dom4j.Element element)
    Loads an Icon from the given Element.
    static Optional<com.vaadin.flow.component.icon.Icon>
    loadIconSetIcon(org.dom4j.Element element, String attributeName)
    Loads an Icon from the given Element for the attribute with the given name and, if present, parses it into an Icon.
    static void
    loadJustifyContent(com.vaadin.flow.component.orderedlayout.FlexComponent component, org.dom4j.Element element)
     
    static void
    loadMargin(com.vaadin.flow.component.orderedlayout.ThemableLayout layout, org.dom4j.Element element)
     
    static void
    loadMaxHeight(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
     
    static void
    loadMaxWidth(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
     
    static void
    loadMinHeight(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
     
    static void
    loadMinWidth(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
     
    static void
    loadPadding(com.vaadin.flow.component.orderedlayout.ThemableLayout layout, org.dom4j.Element element)
     
    static void
    loadSizeAttributes(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
     
    static void
    loadSpacing(com.vaadin.flow.component.orderedlayout.ThemableLayout layout, org.dom4j.Element element)
     
    static void
    loadThemableAttributes(com.vaadin.flow.component.orderedlayout.ThemableLayout layout, org.dom4j.Element element)
     
    static void
    loadThemeList(com.vaadin.flow.component.Component component, org.dom4j.Element element)
     
    static void
    loadThemeNames(com.vaadin.flow.component.HasTheme component, org.dom4j.Element element)
     
    static void
    loadValueAndElementAttributes(com.vaadin.flow.component.HasValueAndElement<?,?> component, org.dom4j.Element element)
     
    static void
    loadValueChangeMode(com.vaadin.flow.data.value.HasValueChangeMode component, org.dom4j.Element element)
     
    static void
    loadWhiteSpace(com.vaadin.flow.component.HasText component, org.dom4j.Element element)
     
    static void
    loadWidth(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • loadSpacing

      public static void loadSpacing(com.vaadin.flow.component.orderedlayout.ThemableLayout layout, org.dom4j.Element element)
    • loadMargin

      public static void loadMargin(com.vaadin.flow.component.orderedlayout.ThemableLayout layout, org.dom4j.Element element)
    • loadPadding

      public static void loadPadding(com.vaadin.flow.component.orderedlayout.ThemableLayout layout, org.dom4j.Element element)
    • loadBoxSizing

      public static void loadBoxSizing(com.vaadin.flow.component.orderedlayout.ThemableLayout layout, org.dom4j.Element element)
    • loadThemableAttributes

      public static void loadThemableAttributes(com.vaadin.flow.component.orderedlayout.ThemableLayout layout, org.dom4j.Element element)
    • loadAlignItems

      public static void loadAlignItems(com.vaadin.flow.component.orderedlayout.FlexComponent component, org.dom4j.Element element)
    • loadJustifyContent

      public static void loadJustifyContent(com.vaadin.flow.component.orderedlayout.FlexComponent component, org.dom4j.Element element)
    • loadFlexibleAttributes

      public static void loadFlexibleAttributes(com.vaadin.flow.component.orderedlayout.FlexComponent component, org.dom4j.Element element)
    • loadValueChangeMode

      public static void loadValueChangeMode(com.vaadin.flow.data.value.HasValueChangeMode component, org.dom4j.Element element)
    • loadThemeNames

      public static void loadThemeNames(com.vaadin.flow.component.HasTheme component, org.dom4j.Element element)
    • loadClassNames

      public static void loadClassNames(com.vaadin.flow.component.HasStyle component, org.dom4j.Element element)
    • loadThemeList

      public static void loadThemeList(com.vaadin.flow.component.Component component, org.dom4j.Element element)
    • loadValueAndElementAttributes

      public static void loadValueAndElementAttributes(com.vaadin.flow.component.HasValueAndElement<?,?> component, org.dom4j.Element element)
    • loadAutofocus

      public static void loadAutofocus(HasAutofocus component, org.dom4j.Element element)
    • loadAutocomplete

      public static void loadAutocomplete(com.vaadin.flow.component.textfield.HasAutocomplete component, org.dom4j.Element element)
    • loadAutocapitalize

      public static void loadAutocapitalize(com.vaadin.flow.component.textfield.HasAutocapitalize component, org.dom4j.Element element)
    • loadAutocorrect

      public static void loadAutocorrect(com.vaadin.flow.component.textfield.HasAutocorrect component, org.dom4j.Element element)
    • loadEnabled

      public static void loadEnabled(com.vaadin.flow.component.HasEnabled component, org.dom4j.Element element)
    • loadWhiteSpace

      public static void loadWhiteSpace(com.vaadin.flow.component.HasText component, org.dom4j.Element element)
    • loadWidth

      public static void loadWidth(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
    • loadMaxWidth

      public static void loadMaxWidth(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
    • loadMinWidth

      public static void loadMinWidth(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
    • loadHeight

      public static void loadHeight(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
    • loadMaxHeight

      public static void loadMaxHeight(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
    • loadMinHeight

      public static void loadMinHeight(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
    • loadSizeAttributes

      public static void loadSizeAttributes(com.vaadin.flow.component.HasSize component, org.dom4j.Element element)
    • loadDuration

      public static Optional<Duration> loadDuration(org.dom4j.Element element, String attributeName)
    • loadIconSetIcon

      public static Optional<com.vaadin.flow.component.icon.Icon> loadIconSetIcon(org.dom4j.Element element)
      Loads an Icon from the given Element. The method tries to retrieve the "icon" attribute value from the element and, if present, parses it into an Icon.
      Parameters:
      element - the XML element from which to load the icon
      Returns:
      an Optional containing the parsed Icon if the "icon" attribute is present and valid, or an empty Optional otherwise
    • loadIconSetIcon

      public static Optional<com.vaadin.flow.component.icon.Icon> loadIconSetIcon(org.dom4j.Element element, String attributeName)
      Loads an Icon from the given Element for the attribute with the given name and, if present, parses it into an Icon.
      Parameters:
      element - the XML element from which to load the icon
      attributeName - the name of the attribute value to be returned
      Returns:
      an Optional containing the parsed Icon if the attribute value is present and valid, or an empty Optional otherwise