aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/demo/sampler/features/windows/SubwindowExample.java
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-10-27 07:57:12 +0000
committerArtur Signell <artur.signell@itmill.com>2009-10-27 07:57:12 +0000
commit6a3c715dae922edd723c9423b4308d5d7948b74e (patch)
tree46a007274681a9803afccf135ace5554f3e01e3a /src/com/vaadin/demo/sampler/features/windows/SubwindowExample.java
parent931d75fef69deb9b738fad97001cf5621de9f43e (diff)
downloadvaadin-framework-6a3c715dae922edd723c9423b4308d5d7948b74e.tar.gz
vaadin-framework-6a3c715dae922edd723c9423b4308d5d7948b74e.zip
Split demo and tests files to own source folders, for #3298
svn changeset:9390/svn branch:6.2
Diffstat (limited to 'src/com/vaadin/demo/sampler/features/windows/SubwindowExample.java')
-rw-r--r--src/com/vaadin/demo/sampler/features/windows/SubwindowExample.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/com/vaadin/demo/sampler/features/windows/SubwindowExample.java b/src/com/vaadin/demo/sampler/features/windows/SubwindowExample.java
deleted file mode 100644
index 49c7809e62..0000000000
--- a/src/com/vaadin/demo/sampler/features/windows/SubwindowExample.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.vaadin.demo.sampler.features.windows;
-
-import com.vaadin.ui.Button;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.Window;
-import com.vaadin.ui.Button.ClickEvent;
-
-@SuppressWarnings("serial")
-public class SubwindowExample extends VerticalLayout {
-
- Window subwindow;
-
- public SubwindowExample() {
-
- // Create the window
- subwindow = new Window("A subwindow");
-
- // Configure the windws layout; by default a VerticalLayout
- VerticalLayout layout = (VerticalLayout) subwindow.getContent();
- layout.setMargin(true);
- layout.setSpacing(true);
-
- // Add some content; a label and a close-button
- Label message = new Label("This is a subwindow");
- subwindow.addComponent(message);
-
- Button close = new Button("Close", new Button.ClickListener() {
- // inline click-listener
- public void buttonClick(ClickEvent event) {
- // close the window by removing it from the main window
- getApplication().getMainWindow().removeWindow(subwindow);
- }
- });
- // The components added to the window are actually added to the window's
- // layout; you can use either. Alignments are set using the layout
- layout.addComponent(close);
- layout.setComponentAlignment(close, "right");
-
- // Add a button for opening the subwindow
- Button open = new Button("Open subwindow", new Button.ClickListener() {
- // inline click-listener
- public void buttonClick(ClickEvent event) {
- if (subwindow.getParent() != null) {
- // window is already showing
- getWindow().showNotification("Window is already open");
- } else {
- // Open the subwindow by adding it to the main window
- getApplication().getMainWindow().addWindow(subwindow);
- }
- }
- });
- addComponent(open);
-
- }
-
-} \ No newline at end of file