@Tag(value="vcf-popup")
@NpmPackage(value="@vaadin-component-factory/vcf-popup",
version="1.2.8")
@JsModule(value="./flow-component-renderer.js") @JsModule(value="@vaadin-component-factory/vcf-popup/src/vcf-popup.js")
public class Popup
extends com.vaadin.flow.component.polymertemplate.PolymerTemplate<Popup.PopupModel>
vcf-popup element.| Modifier and Type | Class and Description |
|---|---|
static interface |
Popup.PopupModel
This model binds properties between java(Popup) and
polymer(vcf-popup.html)
|
static class |
Popup.PopupOpenChangedEvent |
| Constructor and Description |
|---|
Popup() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(com.vaadin.flow.component.Component... components)
Adds the given components into this dialog.
|
void |
addComponentAtIndex(int index,
com.vaadin.flow.component.Component component)
Adds the given component into this dialog at the given index.
|
com.vaadin.flow.shared.Registration |
addPopupOpenChangedEventListener(com.vaadin.flow.component.ComponentEventListener<Popup.PopupOpenChangedEvent> listener)
Adds a listener for
PopupOpenChangedEvent events fired by the
webcomponent. |
String |
getFor()
Gets the id of target component of this popup, or
null if it
doesn't have a target. |
void |
hide()
Hiding popup, if it's open.
|
boolean |
isCloseOnClick()
gets closeOnClick parameter from popup
|
boolean |
isModeless()
Gets modeless value from popup.
|
boolean |
isOpened()
Gets the open state from the popup.
|
protected void |
onAttach(com.vaadin.flow.component.AttachEvent attachEvent) |
void |
remove(com.vaadin.flow.component.Component... components)
Removes components from popup.
|
void |
removeAll()
Removes all components from popup
|
void |
setCloseOnClick(boolean close)
Sets parameter closeOnClick.
|
void |
setFor(String id)
Sets the target component for this popup.
|
void |
setModeless(boolean modeless)
Sets the popup to be modeless.
|
void |
setOpened(boolean opened)
Opens popup.
|
void |
show()
Showing popup, if not showed yet.
|
getModel, getModelType, getModelType, getStateNode, initModel, isSupportedClassaddListener, fireEvent, from, get, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, onEnabledStateChanged, set, setElement, setId, setVisiblepublic com.vaadin.flow.shared.Registration addPopupOpenChangedEventListener(com.vaadin.flow.component.ComponentEventListener<Popup.PopupOpenChangedEvent> listener)
PopupOpenChangedEvent events fired by the
webcomponent.listener - the listenerRegistration for removing the event listenerpublic void show()
public void hide()
public void setOpened(boolean opened)
opened - true to open the popuppublic boolean isOpened()
opened property from the popuppublic void setFor(String id)
By default, the context menu can be opened with a left click or touch on the target component.
id - the if of component for this popup, can be null to
remove the targetprotected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
onAttach in class com.vaadin.flow.component.Componentpublic String getFor()
null if it
doesn't have a target.setFor(String)public void setCloseOnClick(boolean close)
close - true to close the popup automaticallypublic boolean isCloseOnClick()
public void add(com.vaadin.flow.component.Component... components)
The elements in the DOM will not be children of the <vcf-popup>
element, but will be inserted into an overlay that is attached into the
<body>.
components - the components to addpublic void remove(com.vaadin.flow.component.Component... components)
components - the components to removepublic void removeAll()
public void addComponentAtIndex(int index,
com.vaadin.flow.component.Component component)
The element in the DOM will not be child of the <vcf-popup>
element, but will be inserted into an overlay that is attached into the
<body>.
index - the index, where the component will be added.component - the component to addpublic boolean isModeless()
public void setModeless(boolean modeless)
modeless - true if popup should be modeless, false otherwiseCopyright © 2019–2025 Vaadin Ltd. All rights reserved.