aboutsummaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorJouni Koivuviita <jouni@vaadin.com>2014-08-15 12:32:34 +0300
committerArtur Signell <artur@vaadin.com>2014-08-15 10:51:58 +0000
commite95965a10bb6070096ee239ba22cc0e038874bde (patch)
tree4d2d25163cab40ede60d9c1b07720fa1d0ecfb59 /uitest
parent56195677e92cb6ad9ac6e0e5ef2aae2a403d3fc0 (diff)
downloadvaadin-framework-e95965a10bb6070096ee239ba22cc0e038874bde.tar.gz
vaadin-framework-e95965a10bb6070096ee239ba22cc0e038874bde.zip
Add two new size variants for Valo, tiny and huge
Available as additional style names for buttons, text fields/text areas, combo boxes, date fields and labels. Change-Id: I12f36935a690f5bf3f12333f5bd4ac986d4efd1f
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/ButtonsAndLinks.java8
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/ComboBoxes.java16
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/DateFields.java12
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/Labels.java8
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/TextFields.java20
5 files changed, 64 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/themes/valo/ButtonsAndLinks.java b/uitest/src/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
index 758d2de200..e66cd2668b 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/ButtonsAndLinks.java
@@ -136,6 +136,14 @@ public class ButtonsAndLinks extends VerticalLayout implements View {
button = new Button("Three");
group.addComponent(button);
+ button = new Button("Tiny");
+ button.addStyleName("tiny");
+ row.addComponent(button);
+
+ button = new Button("Huge");
+ button.addStyleName("huge");
+ row.addComponent(button);
+
NativeButton nbutton = new NativeButton("Native");
row.addComponent(nbutton);
diff --git a/uitest/src/com/vaadin/tests/themes/valo/ComboBoxes.java b/uitest/src/com/vaadin/tests/themes/valo/ComboBoxes.java
index 1b8b290d91..98a9cad83c 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/ComboBoxes.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/ComboBoxes.java
@@ -162,6 +162,22 @@ public class ComboBoxes extends VerticalLayout implements View {
combo.addItem("Option Three");
combo.addStyleName("borderless");
row.addComponent(combo);
+
+ combo = new ComboBox("Tiny");
+ combo.setInputPrompt("You can type here");
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
+ combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
+ combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
+ combo.addStyleName("tiny");
+ row.addComponent(combo);
+
+ combo = new ComboBox("Huge");
+ combo.setInputPrompt("You can type here");
+ combo.setContainerDataSource(ValoThemeUI.generateContainer(200, false));
+ combo.setItemCaptionPropertyId(ValoThemeUI.CAPTION_PROPERTY);
+ combo.setItemIconPropertyId(ValoThemeUI.ICON_PROPERTY);
+ combo.addStyleName("huge");
+ row.addComponent(combo);
}
@Override
diff --git a/uitest/src/com/vaadin/tests/themes/valo/DateFields.java b/uitest/src/com/vaadin/tests/themes/valo/DateFields.java
index 41aa287f9f..bdc0dc5983 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/DateFields.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/DateFields.java
@@ -172,6 +172,18 @@ public class DateFields extends VerticalLayout implements View {
date.setDateFormat("E dd/MM/yyyy");
row.addComponent(date);
+ date = new DateField("Tiny");
+ date.setValue(new Date());
+ date.setResolution(Resolution.DAY);
+ date.addStyleName("tiny");
+ row.addComponent(date);
+
+ date = new DateField("Huge");
+ date.setValue(new Date());
+ date.setResolution(Resolution.DAY);
+ date.addStyleName("huge");
+ row.addComponent(date);
+
date = new InlineDateField("Date picker");
setDate(date);
row.addComponent(date);
diff --git a/uitest/src/com/vaadin/tests/themes/valo/Labels.java b/uitest/src/com/vaadin/tests/themes/valo/Labels.java
index 08378ad9e6..63c138093c 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/Labels.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/Labels.java
@@ -45,6 +45,10 @@ public class Labels extends VerticalLayout implements View {
left.setMargin(new MarginInfo(false, true, false, false));
split.addComponent(left);
+ Label huge = new Label("Huge type for display text.");
+ huge.addStyleName("huge");
+ left.addComponent(huge);
+
Label large = new Label(
"Large type for introductory text. Etiam at risus et justo dignissim congue. Donec congue lacinia dui, a porttitor lectus condimentum laoreet. Nunc eu.");
large.addStyleName("large");
@@ -68,6 +72,10 @@ public class Labels extends VerticalLayout implements View {
small.addStyleName("small");
left.addComponent(small);
+ Label tiny = new Label("Tiny type for minor text.");
+ tiny.addStyleName("tiny");
+ left.addComponent(tiny);
+
Label h4 = new Label("Section Title");
h4.addStyleName("h4");
left.addComponent(h4);
diff --git a/uitest/src/com/vaadin/tests/themes/valo/TextFields.java b/uitest/src/com/vaadin/tests/themes/valo/TextFields.java
index f8606bb7c9..347a683673 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/TextFields.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/TextFields.java
@@ -182,6 +182,16 @@ public class TextFields extends VerticalLayout implements View {
pwf.setIcon(FontAwesome.LOCK);
row.addComponent(pwf);
+ tf = new TextField("Tiny");
+ tf.setValue("Field value");
+ tf.addStyleName("tiny");
+ row.addComponent(tf);
+
+ tf = new TextField("Huge");
+ tf.setValue("Field value");
+ tf.addStyleName("huge");
+ row.addComponent(tf);
+
h1 = new Label("Text Areas");
h1.addStyleName("h1");
addComponent(h1);
@@ -242,6 +252,16 @@ public class TextFields extends VerticalLayout implements View {
ta.setValue("Field value, spanning multiple lines of text");
row.addComponent(ta);
+ ta = new TextArea("Tiny");
+ ta.addStyleName("tiny");
+ ta.setInputPrompt("Write your comment…");
+ row.addComponent(ta);
+
+ ta = new TextArea("Huge");
+ ta.addStyleName("huge");
+ ta.setInputPrompt("Write your comment…");
+ row.addComponent(ta);
+
RichTextArea rta = new RichTextArea();
rta.setValue("<b>Some</b> <i>rich</i> content");
row.addComponent(rta);