summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-10-26 13:09:33 +0300
committerArtur Signell <artur@vaadin.com>2012-10-26 13:15:39 +0300
commit2972c7d1da1e3fe2939be5120324b3043604a412 (patch)
treeba05dbc10c647857624214a15fd9adf727f2b442
parentde417e542497cb5935fcc64280b4d8f678d1cfb9 (diff)
downloadvaadin-framework-2972c7d1da1e3fe2939be5120324b3043604a412.tar.gz
vaadin-framework-2972c7d1da1e3fe2939be5120324b3043604a412.zip
Test for #10081
Change-Id: I98f2237528451520f36e2d37e179d160418bb8ea
-rw-r--r--uitest/src/com/vaadin/tests/components/label/LabelStyles.java73
1 files changed, 73 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/label/LabelStyles.java b/uitest/src/com/vaadin/tests/components/label/LabelStyles.java
new file mode 100644
index 0000000000..6bf08f4ef6
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/label/LabelStyles.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2011 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.components.label;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Panel;
+import com.vaadin.ui.themes.Reindeer;
+
+public class LabelStyles extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ addComponent(createPanel(null, 1));
+ addComponent(createPanel(null, 2));
+ addComponent(createPanel(Reindeer.LABEL_SMALL, 1));
+ addComponent(createPanel(Reindeer.LABEL_SMALL, 2));
+ addComponent(createPanel(Reindeer.LABEL_H1, 1));
+ addComponent(createPanel(Reindeer.LABEL_H1, 2));
+ addComponent(createPanel(Reindeer.LABEL_H2, 1));
+ addComponent(createPanel(Reindeer.LABEL_H2, 2));
+
+ }
+
+ private Panel createPanel(String styleName, int labels) {
+ Panel p = new Panel("");
+ if (styleName != null) {
+ p.setCaption(styleName);
+ }
+ p.setContent(new GridLayout());
+ // ((VerticalLayout) p.getContent()).setMargin(false);
+ p.setSizeUndefined();
+ p.getContent().setSizeUndefined();
+
+ for (int i = 0; i < labels; i++) {
+ Label l = new Label("Label " + i);
+ if (styleName != null) {
+ l.setStyleName(styleName);
+ }
+ p.addComponent(l);
+ }
+
+ return p;
+ }
+
+ @Override
+ protected String getTestDescription() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}