Package io.jmix.ui.screen
Class ScreenDependencyUtils
java.lang.Object
io.jmix.ui.screen.ScreenDependencyUtils
A class that facilitates adding dependencies such as
CSS, JavaScript, HTML to the current page for screens and fragments.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addScreenDependencies
(FrameOwner frameOwner, String... dependencies) Adds dependency paths to the givenframeOwner
.static void
addScreenDependency
(FrameOwner frameOwner, String path, com.vaadin.ui.Dependency.Type type) Adds a dependency to the givenframeOwner
.protected static Optional<JmixWindowVerticalLayout>
findWindowVerticalLayout
(FrameOwner frameOwner) static List<com.vaadin.ui.HasDependencies.ClientDependency>
getScreenDependencies
(FrameOwner frameOwner) Returns a list of dependencies previously added to the given frame owner.static void
setScreenDependencies
(FrameOwner frameOwner, List<com.vaadin.ui.HasDependencies.ClientDependency> dependencies) Sets a list of dependencies to the givenframeOwner
.
-
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 givenframeOwner
. Each dependency represented with aHasDependencies.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://
orhttps://
- Parameters:
frameOwner
- a frame owner to which dependencies are addeddependencies
- dependencies to set
- WebJar resource - starts with
-
addScreenDependencies
Adds dependency paths to the givenframeOwner
. Each path corresponds to one of the sources:- WebJar resource - starts with
webjar://
- VAADIN directory - starts with
vaadin://
- Web resource - starts with
http://
orhttps://
- Parameters:
frameOwner
- a frame owner to which dependencies are addeddependencies
- dependencies to add
- WebJar resource - starts with
-
addScreenDependency
public static void addScreenDependency(FrameOwner frameOwner, String path, com.vaadin.ui.Dependency.Type type) Adds a dependency to the givenframeOwner
. Path corresponds to one of the sources:- WebJar resource - starts with
webjar://
- VAADIN directory - starts with
vaadin://
- Web resource - starts with
http://
orhttps://
- Parameters:
frameOwner
- a frame owner to which a dependency is addedpath
- a dependency pathtype
- a dependency type
- WebJar resource - starts with
-
findWindowVerticalLayout
-