Package io.jmix.flowui.component
Class UiComponentUtils
java.lang.Object
io.jmix.flowui.component.UiComponentUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<com.vaadin.flow.component.Component>findComponent(com.vaadin.flow.component.Component container, String id) static Optional<com.vaadin.flow.component.Component>findComponent(View<?> view, String id) static com.vaadin.flow.component.dialog.DialogfindDialog(com.vaadin.flow.component.Component component) static Optional<com.vaadin.flow.component.Focusable<?>>findFocusComponent(com.vaadin.flow.component.Component container) static Optional<com.vaadin.flow.component.Focusable<?>>findFocusComponent(View<?> view) static Optional<com.vaadin.flow.component.Focusable<?>>findFocusComponent(View<?> view, String componentId) static Optional<com.vaadin.flow.component.Focusable<?>>findFocusComponent(Collection<com.vaadin.flow.component.Component> components) static Optional<com.vaadin.flow.component.Component>findOwnComponent(com.vaadin.flow.component.Component container, String id) static Optional<com.vaadin.flow.component.Component>findSubPart(HasSubParts container, String id) static View<?>findView(com.vaadin.flow.component.Component component) static voidfocusComponent(com.vaadin.flow.component.Component component) Focuses component (or its nearest focusable parent).static com.vaadin.flow.component.ComponentgetComponent(View<?> view, String id) static Collection<com.vaadin.flow.component.Component>getComponents(com.vaadin.flow.component.Component container) static <V> VgetEmptyValue(com.vaadin.flow.component.Component component) static Collection<com.vaadin.flow.component.Component>getOwnComponents(com.vaadin.flow.component.Component container) static <V> VgetValue(com.vaadin.flow.component.HasValue<?, V> component) static View<?>getView(com.vaadin.flow.component.Component component) static booleanisComponentAttachedToDialog(com.vaadin.flow.component.Component component) static booleanisComponentEnabled(com.vaadin.flow.component.Component child) Tests if component enabled and its container enabled.static booleanisComponentVisible(com.vaadin.flow.component.Component child) Tests if component visible and its container visible.static booleanisContainer(com.vaadin.flow.component.Component component) static booleanstatic <V> voidsetValue(com.vaadin.flow.component.HasValue<?, V> component, V value) static voidwalkComponents(View<?> view, Consumer<ViewChildrenVisitResult> viewChildrenVisitResultConsumer)
-
Method Details
-
findComponent
-
getComponent
-
findComponent
-
getOwnComponents
public static Collection<com.vaadin.flow.component.Component> getOwnComponents(com.vaadin.flow.component.Component container) -
getComponents
public static Collection<com.vaadin.flow.component.Component> getComponents(com.vaadin.flow.component.Component container) -
findOwnComponent
-
findSubPart
public static Optional<com.vaadin.flow.component.Component> findSubPart(HasSubParts container, String id) -
sameId
-
findFocusComponent
-
findFocusComponent
-
findFocusComponent
public static Optional<com.vaadin.flow.component.Focusable<?>> findFocusComponent(com.vaadin.flow.component.Component container) -
findFocusComponent
public static Optional<com.vaadin.flow.component.Focusable<?>> findFocusComponent(Collection<com.vaadin.flow.component.Component> components) -
isContainer
public static boolean isContainer(com.vaadin.flow.component.Component component) -
findDialog
@Nullable public static com.vaadin.flow.component.dialog.Dialog findDialog(com.vaadin.flow.component.Component component) -
getView
-
findView
-
focusComponent
public static void focusComponent(com.vaadin.flow.component.Component component) Focuses component (or its nearest focusable parent).- Parameters:
component- component to focus
-
isComponentVisible
public static boolean isComponentVisible(com.vaadin.flow.component.Component child) Tests if component visible and its container visible.- Parameters:
child- component- Returns:
- component visibility
-
isComponentEnabled
public static boolean isComponentEnabled(com.vaadin.flow.component.Component child) Tests if component enabled and its container enabled.- Parameters:
child- component- Returns:
- component enabled state
-
isComponentAttachedToDialog
public static boolean isComponentAttachedToDialog(com.vaadin.flow.component.Component component) -
getEmptyValue
@Nullable public static <V> V getEmptyValue(com.vaadin.flow.component.Component component) -
getValue
@Nullable public static <V> V getValue(com.vaadin.flow.component.HasValue<?, V> component) -
setValue
public static <V> void setValue(com.vaadin.flow.component.HasValue<?, V> component, @Nullable V value) -
walkComponents
public static void walkComponents(View<?> view, Consumer<ViewChildrenVisitResult> viewChildrenVisitResultConsumer)
-