summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-05-22 16:51:00 +0000
committerArtur Signell <artur.signell@itmill.com>2009-05-22 16:51:00 +0000
commitcdf098a9eb939b1488f377067f53833073892fd7 (patch)
treec16a61b1b19bd1c0e002606ecf442c15e2c596b9 /src
parenta77afeb05580529ed92b273a5de69d51990199a2 (diff)
downloadvaadin-framework-cdf098a9eb939b1488f377067f53833073892fd7.tar.gz
vaadin-framework-cdf098a9eb939b1488f377067f53833073892fd7.zip
Test case for #2085
svn changeset:7975/svn branch:6.0
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/tests/components/button/TooltipForDisabledButton.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/com/vaadin/tests/components/button/TooltipForDisabledButton.java b/src/com/vaadin/tests/components/button/TooltipForDisabledButton.java
new file mode 100644
index 0000000000..3fed5b9c02
--- /dev/null
+++ b/src/com/vaadin/tests/components/button/TooltipForDisabledButton.java
@@ -0,0 +1,48 @@
+package com.vaadin.tests.components.button;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+
+public class TooltipForDisabledButton extends TestBase {
+
+ @Override
+ protected String getDescription() {
+ return "A disabled button should show a tooltip when hovering it";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 2085;
+ }
+
+ @Override
+ protected void setup() {
+ Button buttonEnabled = new Button("This is an enabled button");
+ Button buttonDisabled = new Button("This is an disabled button");
+ buttonDisabled.setEnabled(false);
+
+ buttonEnabled.setDescription("Tooltip for enabled");
+ buttonDisabled.setDescription("Tooltip for disabled");
+
+ buttonDisabled.addListener(new Button.ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+ getMainWindow().showNotification("Clicked Disabled");
+ }
+
+ });
+
+ buttonEnabled.addListener(new Button.ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+ getMainWindow().showNotification("Clicked Enabled");
+ }
+
+ });
+
+ addComponent(buttonEnabled);
+ addComponent(buttonDisabled);
+ }
+
+}