]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed typo in tooltip, properly. Fixes #2636
authorMarc Englund <marc.englund@itmill.com>
Thu, 19 Feb 2009 15:29:05 +0000 (15:29 +0000)
committerMarc Englund <marc.englund@itmill.com>
Thu, 19 Feb 2009 15:29:05 +0000 (15:29 +0000)
svn changeset:6912/svn branch:trunk

src/com/itmill/toolkit/demo/sampler/features/commons/TooltipsExample.java

index dabad8b7a8540a3f7d84e2947f0ebed67164d03d..d5722254c4085663ac3e4c9efaf4f2e199ff9bec 100644 (file)
@@ -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 <b>Edit my tooltip</b> to edit this tooltip, then <b>Apply</b>");
+        rte.setValue("Click <b>" + editTxt
+                + "</b> to edit this tooltip, then <b>" + applyTxt + "</b>");
         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);
                 }
             }
         });