From 2ef2fa35bb99e3c3ef05df6fe6dc581b5814ae7b Mon Sep 17 00:00:00 2001 From: Marc Englund Date: Thu, 19 Feb 2009 15:29:05 +0000 Subject: [PATCH] Fixed typo in tooltip, properly. Fixes #2636 svn changeset:6912/svn branch:trunk --- .../sampler/features/commons/TooltipsExample.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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); } } }); -- 2.39.5