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.Dialog
findDialog
(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 View<?>
findView
(com.vaadin.flow.component.Component component) static void
focusComponent
(com.vaadin.flow.component.Component component) Focuses component (or its nearest focusable parent).static com.vaadin.flow.component.Component
getComponent
(View<?> view, String id) static Collection<com.vaadin.flow.component.Component>
getComponents
(com.vaadin.flow.component.Component container) static <V> V
getEmptyValue
(com.vaadin.flow.component.Component component) static Collection<com.vaadin.flow.component.Component>
getOwnComponents
(com.vaadin.flow.component.Component container) static <V> V
getValue
(com.vaadin.flow.component.HasValue<?, V> component) static View<?>
getView
(com.vaadin.flow.component.Component component) static boolean
isComponentAttachedToDialog
(com.vaadin.flow.component.Component component) static boolean
isComponentEnabled
(com.vaadin.flow.component.Component child) Tests if component enabled and its container enabled.static boolean
isComponentVisible
(com.vaadin.flow.component.Component child) Tests if component visible and its container visible.static boolean
isContainer
(com.vaadin.flow.component.Component component) static boolean
static <V> void
setValue
(com.vaadin.flow.component.HasValue<?, V> component, V value)
-
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
-
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)
-