diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2015-12-03 14:59:05 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-12-03 14:59:12 +0000 |
commit | 2af72ba9636bec70046394c41744f89ce4572e35 (patch) | |
tree | ccb3dc2d2239585f8c3f79eb5f131ff61ca9ce86 /documentation/components/components-popupview.asciidoc | |
parent | 8aa5fabe89f2967e966a64842a608eceaf80d08f (diff) | |
download | vaadin-framework-2af72ba9636bec70046394c41744f89ce4572e35.tar.gz vaadin-framework-2af72ba9636bec70046394c41744f89ce4572e35.zip |
Revert "Merge branch 'documentation'"7.6.0.beta2
This reverts commit f6874bde3d945c8b2d1b5c17ab50e2d0f1f8ff00.
Change-Id: I67ee1c30ba3e3bcc3c43a1dd2e73a822791514bf
Diffstat (limited to 'documentation/components/components-popupview.asciidoc')
-rw-r--r-- | documentation/components/components-popupview.asciidoc | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/documentation/components/components-popupview.asciidoc b/documentation/components/components-popupview.asciidoc deleted file mode 100644 index a26d15d951..0000000000 --- a/documentation/components/components-popupview.asciidoc +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: PopupView -order: 29 -layout: page ---- - -[[components.popupview]] -= [classname]#PopupView# - -The [classname]#PopupView# component allows opening a pop-up view either by -clicking on a link or programmatically. The component has two representations: a -minimized textual representation and the popped-up content. The view can contain -any components. The view closes automatically when the mouse pointer moves -outside the view. - -In the following, we have a popup view with a text field and a button that opens -automatically when the user clicks on a "Open the popup" link: - - -[source, java] ----- -// Content for the PopupView -VerticalLayout popupContent = new VerticalLayout(); -popupContent.addComponent(new TextField("Textfield")); -popupContent.addComponent(new Button("Button")); - -// The component itself -PopupView popup = new PopupView("Pop it up", popupContent); -layout.addComponent(popup); ----- - -If the textual minimized representation is not given (a null is given), the -component is invisible in the minimized state. The pop-up can be opened -programmatically by calling [methodname]#setPopupVisible(true)#. For example: - - -[source, java] ----- -// A pop-up view without minimalized representation -PopupView popup = new PopupView(null, - new Table(null, TableExample.generateContent())); - -// A component to open the view -Button button = new Button("Show table", click -> // Java 8 - popup.setPopupVisible(true)); - -layout.addComponents(button, popup); ----- - -When the pop-up is opened or closed, a [classname]#PopupVisibilityEvent# is -fired, which can be handled with a [interfacename]#PopupVisibilityListener# -added with [methodname]#setPopupVisibilityListener()#. - - -[source, java] ----- -// Fill the pop-up content when it's popped up -popup.addPopupVisibilityListener(event -> { - if (event.isPopupVisible()) { - popupContent.removeAllComponents(); - popupContent.addComponent(new Table(null, - TableExample.generateContent())); - }}); ----- - -[[components.popupview.css]] -== CSS Style Rules - - -[source, css] ----- -.v-popupview {} -.v-overlay-container { - .v-popupview-popup { - .popupContent { } - } -} ----- - -In minimalized state, the component has [literal]#++v-popupview++# style. When -popped up, the pop-up content is shown in a [literal]#++v-popupview-popup++# -overlay element under the [literal]#++v-overlay-container++#, which is contains -all floating overlays outside the component hierarchy. - - - - |