diff options
author | Artur Signell <artur.signell@itmill.com> | 2009-04-14 13:56:03 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2009-04-14 13:56:03 +0000 |
commit | 15824cc384cd04bb73cf15f834fa89fa7cf8aff0 (patch) | |
tree | b809ff4dc2103a74795df66bff9af37e587c5b05 | |
parent | 331c7c6fc2ce8e085409f74528a6daf5af0e7c4b (diff) | |
download | vaadin-framework-15824cc384cd04bb73cf15f834fa89fa7cf8aff0.tar.gz vaadin-framework-15824cc384cd04bb73cf15f834fa89fa7cf8aff0.zip |
Merged test case for #2846
svn changeset:7405/svn branch:6.0
-rw-r--r-- | src/com/itmill/toolkit/tests/components/tabsheet/TabSheetCaptions.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/com/itmill/toolkit/tests/components/tabsheet/TabSheetCaptions.java b/src/com/itmill/toolkit/tests/components/tabsheet/TabSheetCaptions.java new file mode 100644 index 0000000000..be9cfaafbb --- /dev/null +++ b/src/com/itmill/toolkit/tests/components/tabsheet/TabSheetCaptions.java @@ -0,0 +1,44 @@ +package com.itmill.toolkit.tests.components.tabsheet;
+
+import com.itmill.toolkit.tests.components.TestBase;
+import com.itmill.toolkit.ui.Button;
+import com.itmill.toolkit.ui.Label;
+import com.itmill.toolkit.ui.Panel;
+import com.itmill.toolkit.ui.TabSheet;
+import com.itmill.toolkit.ui.Button.ClickEvent;
+
+public class TabSheetCaptions extends TestBase {
+
+ Panel panel1;
+
+ @Override
+ protected String getDescription() {
+ return "Updating the tabsheet tab text should not change the caption of the component. Click on the button to change the tab text. This must update the tab and not touch the Panel's caption.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 2846;
+ }
+
+ @Override
+ protected void setup() {
+ final TabSheet tabSheet = new TabSheet();
+
+ panel1 = new Panel("tab 1");
+ panel1.setSizeFull();
+ panel1.getLayout().setSizeFull();
+ panel1.addComponent(new Label("This is first panel"));
+ tabSheet.addTab(panel1);
+
+ Button button = new Button("Update tab caption");
+ button.addListener(new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ tabSheet.setTabCaption(panel1, "This is a new caption");
+ }
+ });
+
+ addComponent(tabSheet);
+ addComponent(button);
+ }
+}
|