]> source.dussan.org Git - vaadin-framework.git/commitdiff
Renamed LabelsExample -> LabelExample
authorMarc Englund <marc.englund@itmill.com>
Mon, 3 Dec 2007 13:27:58 +0000 (13:27 +0000)
committerMarc Englund <marc.englund@itmill.com>
Mon, 3 Dec 2007 13:27:58 +0000 (13:27 +0000)
svn changeset:3121/svn branch:trunk

src/com/itmill/toolkit/demo/featurebrowser/FeatureBrowser.java
src/com/itmill/toolkit/demo/featurebrowser/LabelExample.java [new file with mode: 0644]
src/com/itmill/toolkit/demo/featurebrowser/LabelsExample.java [deleted file]

index 220ac9960f47664c1786e8934ef599a7c3699e1b..a018744838b2d73ac938702d486329f5da0bd9fe 100644 (file)
@@ -49,7 +49,7 @@ public class FeatureBrowser extends com.itmill.toolkit.Application implements
     // Category, Name, Desc, Class, Viewed
             // Getting started: Labels
             { "Getting started", "Labels", "Some variations of Labels",
-                    LabelsExample.class },
+                    LabelExample.class },
             // Getting started: Buttons
             { "Getting started", "Buttons and links",
                     "Some variations of Buttons and Links", ButtonExample.class },
diff --git a/src/com/itmill/toolkit/demo/featurebrowser/LabelExample.java b/src/com/itmill/toolkit/demo/featurebrowser/LabelExample.java
new file mode 100644 (file)
index 0000000..41e14b8
--- /dev/null
@@ -0,0 +1,77 @@
+package com.itmill.toolkit.demo.featurebrowser;\r
+\r
+import com.itmill.toolkit.ui.CustomComponent;\r
+import com.itmill.toolkit.ui.GridLayout;\r
+import com.itmill.toolkit.ui.Label;\r
+import com.itmill.toolkit.ui.OrderedLayout;\r
+import com.itmill.toolkit.ui.Panel;\r
+\r
+/**\r
+ * Shows a few variations of Labels, including the effects of XHTML- and\r
+ * pre-formatted mode.\r
+ * \r
+ * @author IT Mill Ltd.\r
+ */\r
+public class LabelExample extends CustomComponent {\r
+\r
+    private static final String xhtml = "This text has <b>HTML</b> formatting.<br/>"\r
+            + "A plain <i>Label</i> will show the markup, while a <u>XHTML-mode</u>"\r
+            + " <i>Label</i> will show the formatted text.";\r
+\r
+    private static final String pre = "This text has linebreaks.\n\n"\r
+            + "They will show up in a preformatted Label,\n"\r
+            + "but not in a \"plain\" Label.\n\n"\r
+            + "       This is an indented row. \n       Same indentation here.";\r
+\r
+    public LabelExample() {\r
+\r
+        OrderedLayout main = new OrderedLayout();\r
+        main.setMargin(true);\r
+        setCompositionRoot(main);\r
+\r
+        GridLayout g = new GridLayout(2, 4);\r
+        main.addComponent(g);\r
+\r
+        // plain w/o caption\r
+        Panel p = new Panel("Plain");\r
+        p.setStyleName(Panel.STYLE_LIGHT);\r
+        Label l = new Label("A plain label without caption.");\r
+        p.addComponent(l);\r
+        g.addComponent(p);\r
+        // plain w/ caption\r
+        p = new Panel("Plain w/ caption + tooltip");\r
+        p.setStyleName(Panel.STYLE_LIGHT);\r
+        l = new Label("A plain label with caption.");\r
+        l.setCaption("Label caption");\r
+        l.setDescription("This is a description (tooltip) for the label.");\r
+        p.addComponent(l);\r
+        g.addComponent(p);\r
+        // plain w/ xhtml\r
+        p = new Panel("Plain w/ XHTML content");\r
+        p.setStyleName(Panel.STYLE_LIGHT);\r
+        l = new Label(xhtml);\r
+        p.addComponent(l);\r
+        g.addComponent(p);\r
+        // xhtml w/ xhtml\r
+        p = new Panel("XHTML-mode w/ XHTML content");\r
+        p.setStyleName(Panel.STYLE_LIGHT);\r
+        l = new Label(xhtml);\r
+        l.setContentMode(Label.CONTENT_XHTML);\r
+        p.addComponent(l);\r
+        g.addComponent(p);\r
+        // plain w/ preformatted\r
+        p = new Panel("Plain w/ preformatted content");\r
+        p.setStyleName(Panel.STYLE_LIGHT);\r
+        l = new Label(pre);\r
+        p.addComponent(l);\r
+        g.addComponent(p);\r
+        // preformatted w/ preformatted\r
+        p = new Panel("Preformatted-mode w/ preformatted content");\r
+        p.setStyleName(Panel.STYLE_LIGHT);\r
+        l = new Label(pre);\r
+        l.setContentMode(Label.CONTENT_PREFORMATTED);\r
+        p.addComponent(l);\r
+        g.addComponent(p);\r
+\r
+    }\r
+}\r
diff --git a/src/com/itmill/toolkit/demo/featurebrowser/LabelsExample.java b/src/com/itmill/toolkit/demo/featurebrowser/LabelsExample.java
deleted file mode 100644 (file)
index adb4b53..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.itmill.toolkit.demo.featurebrowser;\r
-\r
-import com.itmill.toolkit.ui.CustomComponent;\r
-import com.itmill.toolkit.ui.GridLayout;\r
-import com.itmill.toolkit.ui.Label;\r
-import com.itmill.toolkit.ui.OrderedLayout;\r
-import com.itmill.toolkit.ui.Panel;\r
-\r
-/**\r
- * Shows a few variations of Labels, including the effects of XHTML- and\r
- * pre-formatted mode.\r
- * \r
- * @author IT Mill Ltd.\r
- */\r
-public class LabelsExample extends CustomComponent {\r
-\r
-    private static final String xhtml = "This text has <b>HTML</b> formatting.<br/>"\r
-            + "A plain <i>Label</i> will show the markup, while a <u>XHTML-mode</u>"\r
-            + " <i>Label</i> will show the formatted text.";\r
-\r
-    private static final String pre = "This text has linebreaks.\n\n"\r
-            + "They will show up in a preformatted Label,\n"\r
-            + "but not in a \"plain\" Label.\n\n"\r
-            + "       This is an indented row. \n       Same indentation here.";\r
-\r
-    public LabelsExample() {\r
-\r
-        OrderedLayout main = new OrderedLayout();\r
-        main.setMargin(true);\r
-        setCompositionRoot(main);\r
-\r
-        GridLayout g = new GridLayout(2, 4);\r
-        main.addComponent(g);\r
-\r
-        // plain w/o caption\r
-        Panel p = new Panel("Plain");\r
-        p.setStyleName(Panel.STYLE_LIGHT);\r
-        Label l = new Label("A plain label without caption.");\r
-        p.addComponent(l);\r
-        g.addComponent(p);\r
-        // plain w/ caption\r
-        p = new Panel("Plain w/ caption + tooltip");\r
-        p.setStyleName(Panel.STYLE_LIGHT);\r
-        l = new Label("A plain label with caption.");\r
-        l.setCaption("Label caption");\r
-        l.setDescription("This is a description (tooltip) for the label.");\r
-        p.addComponent(l);\r
-        g.addComponent(p);\r
-        // plain w/ xhtml\r
-        p = new Panel("Plain w/ XHTML content");\r
-        p.setStyleName(Panel.STYLE_LIGHT);\r
-        l = new Label(xhtml);\r
-        p.addComponent(l);\r
-        g.addComponent(p);\r
-        // xhtml w/ xhtml\r
-        p = new Panel("XHTML-mode w/ XHTML content");\r
-        p.setStyleName(Panel.STYLE_LIGHT);\r
-        l = new Label(xhtml);\r
-        l.setContentMode(Label.CONTENT_XHTML);\r
-        p.addComponent(l);\r
-        g.addComponent(p);\r
-        // plain w/ preformatted\r
-        p = new Panel("Plain w/ preformatted content");\r
-        p.setStyleName(Panel.STYLE_LIGHT);\r
-        l = new Label(pre);\r
-        p.addComponent(l);\r
-        g.addComponent(p);\r
-        // preformatted w/ preformatted\r
-        p = new Panel("Preformatted-mode w/ preformatted content");\r
-        p.setStyleName(Panel.STYLE_LIGHT);\r
-        l = new Label(pre);\r
-        l.setContentMode(Label.CONTENT_PREFORMATTED);\r
-        p.addComponent(l);\r
-        g.addComponent(p);\r
-\r
-    }\r
-}\r