diff options
author | Artur Signell <artur.signell@itmill.com> | 2011-03-31 11:06:20 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2011-03-31 11:06:20 +0000 |
commit | 2bf2b55dcfe7bfc0a902afc26516dbcc362ca99e (patch) | |
tree | 8c66f52cb5c66eb3966d0ac89d6992b8d7ccb47c /tests | |
parent | e0edfc49e02a9d16d38c6b280312c525b148265d (diff) | |
download | vaadin-framework-2bf2b55dcfe7bfc0a902afc26516dbcc362ca99e.tar.gz vaadin-framework-2bf2b55dcfe7bfc0a902afc26516dbcc362ca99e.zip |
Test for #6590
svn changeset:18053/svn branch:6.5
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/vaadin/tests/components/menubar/MenuBarInSplitPanel.java | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/components/menubar/MenuBarInSplitPanel.java b/tests/src/com/vaadin/tests/components/menubar/MenuBarInSplitPanel.java new file mode 100644 index 0000000000..4a41f8d8dc --- /dev/null +++ b/tests/src/com/vaadin/tests/components/menubar/MenuBarInSplitPanel.java @@ -0,0 +1,47 @@ +package com.vaadin.tests.components.menubar; + +import com.vaadin.tests.components.AbstractTestCase; +import com.vaadin.ui.HorizontalSplitPanel; +import com.vaadin.ui.Label; +import com.vaadin.ui.MenuBar; +import com.vaadin.ui.Tree; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.Window; + +public class MenuBarInSplitPanel extends AbstractTestCase { + + @Override + protected String getDescription() { + return "Move the splitter left so that some menu items are collapsed, then back right. The menu bar should always fill the available space."; + } + + @Override + protected Integer getTicketNumber() { + return 6590; + } + + @Override + public void init() { + Window mainWindow = new Window("MenuBar in SplitPanel", + new HorizontalSplitPanel()); + VerticalLayout left = new VerticalLayout(); + mainWindow.addComponent(left); + left.setSizeFull(); + MenuBar menu = new MenuBar(); + menu.setWidth("100%"); + menu.addItem("File", null); + menu.addItem("Edit", null); + menu.addItem("Help", null); + left.addComponent(menu); + Tree tree = new Tree(); + for (int i = 0; i < 10; i++) { + tree.addItem("Node " + i); + } + left.addComponent(tree); + left.setExpandRatio(tree, 1.0f); + Label label = new Label("Right"); + mainWindow.addComponent(label); + setMainWindow(mainWindow); + } + +} |