Class ScreenDependencyUtils

java.lang.Object
io.jmix.ui.screen.ScreenDependencyUtils

@ParametersAreNonnullByDefault public final class ScreenDependencyUtils extends Object
A class that facilitates adding dependencies such as CSS, JavaScript, HTML to the current page for screens and fragments.
  • Constructor Details

    • ScreenDependencyUtils

      public ScreenDependencyUtils()
  • Method Details

    • getScreenDependencies

      public static List<com.vaadin.ui.HasDependencies.ClientDependency> getScreenDependencies(FrameOwner frameOwner)
      Returns a list of dependencies previously added to the given frame owner.
      Parameters:
      frameOwner - a frame owner from which the dependency list is obtained
      Returns:
      a list of dependencies
    • setScreenDependencies

      public static void setScreenDependencies(FrameOwner frameOwner, List<com.vaadin.ui.HasDependencies.ClientDependency> dependencies)
      Sets a list of dependencies to the given frameOwner. Each dependency represented with a HasDependencies.ClientDependency object which path corresponds to one of the sources:
      • WebJar resource - starts with webjar://
      • VAADIN directory - starts with vaadin://
      • Web resource - starts with http:// or https://
      Parameters:
      frameOwner - a frame owner to which dependencies are added
      dependencies - dependencies to set
    • addScreenDependencies

      public static void addScreenDependencies(FrameOwner frameOwner, String... dependencies)
      Adds dependency paths to the given frameOwner. Each path corresponds to one of the sources:
      • WebJar resource - starts with webjar://
      • VAADIN directory - starts with vaadin://
      • Web resource - starts with http:// or https://
      Parameters:
      frameOwner - a frame owner to which dependencies are added
      dependencies - dependencies to add
    • addScreenDependency

      public static void addScreenDependency(FrameOwner frameOwner, String path, com.vaadin.ui.Dependency.Type type)
      Adds a dependency to the given frameOwner. Path corresponds to one of the sources:
      • WebJar resource - starts with webjar://
      • VAADIN directory - starts with vaadin://
      • Web resource - starts with http:// or https://
      Parameters:
      frameOwner - a frame owner to which a dependency is added
      path - a dependency path
      type - a dependency type
    • findWindowVerticalLayout

      protected static Optional<JmixWindowVerticalLayout> findWindowVerticalLayout(FrameOwner frameOwner)