From ede903d48329523a07dff5b820dfba410ae18e05 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 7 Dec 2010 15:48:38 +0000 Subject: #2942 - Dual captions for TwinColSelect Changed style names to be consistent with server side API Added test for caption style names svn changeset:16375/svn branch:6.5 --- .../select/TwinColSelectCaptionStyles.html | 37 +++++++++++++++++++ .../select/TwinColSelectCaptionStyles.java | 42 ++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 tests/src/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.html create mode 100644 tests/src/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.java (limited to 'tests') diff --git a/tests/src/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.html b/tests/src/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.html new file mode 100644 index 0000000000..7fd4908673 --- /dev/null +++ b/tests/src/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.html @@ -0,0 +1,37 @@ + + + + + + +New Test + + + + + + + + + + + + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.components.select.TwinColSelectCaptionStyles?restartApplication
screenCaptureauto-auto
clickvaadin=runcomvaadintestscomponentsselectTwinColSelectCaptionStyles::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]
screenCapture500px-500px
+ + diff --git a/tests/src/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.java b/tests/src/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.java new file mode 100644 index 0000000000..f3d147e32a --- /dev/null +++ b/tests/src/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.java @@ -0,0 +1,42 @@ +package com.vaadin.tests.components.select; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.TwinColSelect; + +public class TwinColSelectCaptionStyles extends TestBase { + + @Override + protected void setup() { + setTheme("tests-tickets"); + final TwinColSelect sel = new TwinColSelect("Component caption"); + sel.setLeftColumnCaption("Left caption"); + sel.setRightColumnCaption("Right caption"); + sel.setStyleName("styled-twincol-captions"); + sel.setWidth("300px"); + addComponent(sel); + + Button b = new Button("Set height and width to 500px", + new Button.ClickListener() { + + public void buttonClick(ClickEvent event) { + sel.setHeight("500px"); + sel.setWidth("500px"); + + } + }); + addComponent(b); + } + + @Override + protected String getDescription() { + return "Tests that caption styling for TwinColSelect captions work properly. The left caption should be red and the right caption blue and larger than the left one."; + } + + @Override + protected Integer getTicketNumber() { + return null; + } + +} -- cgit v1.2.3