From: Marc Englund Date: Thu, 19 Feb 2009 15:29:05 +0000 (+0000) Subject: Fixed typo in tooltip, properly. Fixes #2636 X-Git-Tag: 6.7.0.beta1~3103 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2ef2fa35bb99e3c3ef05df6fe6dc581b5814ae7b;p=vaadin-framework.git Fixed typo in tooltip, properly. Fixes #2636 svn changeset:6912/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/demo/sampler/features/commons/TooltipsExample.java b/src/com/itmill/toolkit/demo/sampler/features/commons/TooltipsExample.java index dabad8b7a8..d5722254c4 100644 --- a/src/com/itmill/toolkit/demo/sampler/features/commons/TooltipsExample.java +++ b/src/com/itmill/toolkit/demo/sampler/features/commons/TooltipsExample.java @@ -7,6 +7,9 @@ import com.itmill.toolkit.ui.Button.ClickEvent; public class TooltipsExample extends VerticalLayout { + private static final String editTxt = "Edit tooltip"; + private static final String applyTxt = "Apply"; + public TooltipsExample() { setSpacing(true); @@ -30,19 +33,19 @@ public class TooltipsExample extends VerticalLayout { /* Edit */ final RichTextArea rte = new RichTextArea(); - rte - .setValue("Click Edit my tooltip to edit this tooltip, then Apply"); + rte.setValue("Click " + editTxt + + " to edit this tooltip, then " + applyTxt + ""); rte.setVisible(false); // hide editor initially addComponent(rte); - Button apply = new Button("Edit tooltip", new Button.ClickListener() { + Button apply = new Button(editTxt, new Button.ClickListener() { public void buttonClick(ClickEvent event) { if (rte.isVisible()) { rte.setVisible(false); event.getButton().setDescription((String) rte.getValue()); - event.getButton().setCaption("Edit tooltip"); + event.getButton().setCaption(editTxt); } else { rte.setVisible(true); - event.getButton().setCaption("Apply"); + event.getButton().setCaption(applyTxt); } } });