@HtmlImport(value="frontend://webapi/visibility.html") @Tag(value="rap-visibility") public class Visibility extends JavascriptTemplate<Visibility.VisibilityTemplateModel>
| Modifier and Type | Class and Description |
|---|---|
static interface |
Visibility.VisibilityTemplateModel |
| Constructor and Description |
|---|
Visibility(com.vaadin.flow.component.HasElement parent) |
| Modifier and Type | Method and Description |
|---|---|
com.vaadin.flow.shared.Registration |
addVisibilityChangeListener(com.vaadin.flow.function.SerializableConsumer<VisibilityState> onVisibilityReceived)
Register a onVisibilityChange listener.
|
static void |
getVisibilityState(Consumer<VisibilityState> onVisibilityStateReceived)
Get the current visibility state of your application.
|
static void |
isHidden(com.vaadin.flow.function.SerializableConsumer<Boolean> onStatusReceived)
Asks the device if the application is currently hidden.
|
void |
unregisterAllVisibilityChangeListeners()
Unregister previously registered onVisibilityChange listeners.
|
clearConsumers, notifyConsumers, registerConsumer, registerConsumer, unregisterAllConsumers, unregisterAllConsumersgetModel, getModelType, getModelType, getStateNode, initModel, isSupportedClassaddListener, fireEvent, from, get, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisiblepublic com.vaadin.flow.shared.Registration addVisibilityChangeListener(com.vaadin.flow.function.SerializableConsumer<VisibilityState> onVisibilityReceived)
unregisterAllVisibilityChangeListeners() method.public void unregisterAllVisibilityChangeListeners()
addVisibilityChangeListener(SerializableConsumer) method.public static void getVisibilityState(Consumer<VisibilityState> onVisibilityStateReceived)
onVisibilityStateReceived - The callback triggered when the visibility status was received from the client. It consumes said
visibility state.public static void isHidden(com.vaadin.flow.function.SerializableConsumer<Boolean> onStatusReceived)
getVisibilityState(Consumer) method.onStatusReceived - The callback triggered when the status is received from the client. It consumes said status.Copyright © 2020 XDEV Software Corp.. All rights reserved.