diff options
author | Artur Signell <artur.signell@itmill.com> | 2009-10-27 07:57:12 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2009-10-27 07:57:12 +0000 |
commit | 6a3c715dae922edd723c9423b4308d5d7948b74e (patch) | |
tree | 46a007274681a9803afccf135ace5554f3e01e3a /src/com/vaadin/automatedtests/featurebrowser/LabelExample.java | |
parent | 931d75fef69deb9b738fad97001cf5621de9f43e (diff) | |
download | vaadin-framework-6a3c715dae922edd723c9423b4308d5d7948b74e.tar.gz vaadin-framework-6a3c715dae922edd723c9423b4308d5d7948b74e.zip |
Split demo and tests files to own source folders, for #3298
svn changeset:9390/svn branch:6.2
Diffstat (limited to 'src/com/vaadin/automatedtests/featurebrowser/LabelExample.java')
-rw-r--r-- | src/com/vaadin/automatedtests/featurebrowser/LabelExample.java | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/src/com/vaadin/automatedtests/featurebrowser/LabelExample.java b/src/com/vaadin/automatedtests/featurebrowser/LabelExample.java deleted file mode 100644 index 37b946824d..0000000000 --- a/src/com/vaadin/automatedtests/featurebrowser/LabelExample.java +++ /dev/null @@ -1,84 +0,0 @@ -/*
-@ITMillApache2LicenseForJavaFiles@
- */
-
-package com.vaadin.automatedtests.featurebrowser;
-
-import com.vaadin.ui.CustomComponent;
-import com.vaadin.ui.GridLayout;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.Panel;
-
-/**
- * Shows a few variations of Labels, including the effects of XHTML- and
- * pre-formatted mode.
- *
- * @author IT Mill Ltd.
- */
-public class LabelExample extends CustomComponent {
-
- private static final String xhtml = "This text has <b>HTML</b> formatting.<br/>"
- + "A plain <i>Label</i> will show the markup, while a <u>XHTML-mode</u>"
- + " <i>Label</i> will show the formatted text.";
-
- private static final String pre = "This text has linebreaks.\n\n"
- + "They will show up in a preformatted Label,\n"
- + "but not in a \"plain\" Label.\n\n"
- + " This is an indented row. \n Same indentation here.";
-
- public LabelExample() {
- final GridLayout g = new GridLayout(2, 4);
- g.setMargin(true);
- setCompositionRoot(g);
- g.setWidth("100%");
-
- // plain w/o caption
- Panel p = getExpamplePanel("Plain");
- Label l = new Label("A plain label without caption.");
- l.setDebugId("label1");
- p.addComponent(l);
- g.addComponent(p);
- // plain w/ caption
- p = getExpamplePanel("Plain w/ caption + tooltip");
- l = new Label("A plain label with caption.");
- l.setCaption("Label caption");
- l.setDebugId("label2");
- l.setDescription("This is a description (tooltip) for the label.");
- p.addComponent(l);
- g.addComponent(p);
- // plain w/ xhtml
- p = getExpamplePanel("Plain w/ XHTML content");
- l = new Label(xhtml);
- l.setDebugId("label3");
- p.addComponent(l);
- g.addComponent(p);
- // xhtml w/ xhtml
- p = getExpamplePanel("XHTML-mode w/ XHTML content");
- l = new Label(xhtml);
- l.setDebugId("label4");
- l.setContentMode(Label.CONTENT_XHTML);
- p.addComponent(l);
- g.addComponent(p);
- // plain w/ preformatted
- p = getExpamplePanel("Plain w/ preformatted content");
- l = new Label(pre);
- l.setDebugId("label5");
- p.addComponent(l);
- g.addComponent(p);
- // preformatted w/ preformatted
- p = getExpamplePanel("Preformatted-mode w/ preformatted content");
- l = new Label(pre);
- l.setDebugId("label6");
- l.setContentMode(Label.CONTENT_PREFORMATTED);
- p.addComponent(l);
- g.addComponent(p);
-
- }
-
- private Panel getExpamplePanel(String caption) {
- Panel p = new Panel(caption);
- p.setDebugId(p.getCaption());
- p.addStyleName(Panel.STYLE_LIGHT);
- return p;
- }
-}
|