.v-select-twincol-options {
float: left;
}
-.v-select-twincol-options-caption {
+.v-select-twincol-caption-left {
float: left;
overflow: hidden;
text-overflow: ellipsis;
.v-select-twincol-selections {
font-weight: bold;
}
-.v-select-twincol-selections-caption {
+.v-select-twincol-caption-right {
float: right;
overflow: hidden;
text-overflow: ellipsis;
.v-select-twincol-options {
float: left;
}
-.v-select-twincol-options-caption {
+.v-select-twincol-caption-left {
float: left;
overflow: hidden;
text-overflow: ellipsis;
.v-select-twincol-selections {
font-weight: bold;
}
-.v-select-twincol-selections-caption {
+.v-select-twincol-caption-right {
float: right;
overflow: hidden;
text-overflow: ellipsis;
.v-select-twincol-options {
float: left;
}
-.v-select-twincol-options-caption {
+.v-select-twincol-caption-left {
float: left;
overflow: hidden;
text-overflow: ellipsis;
.v-select-twincol-selections {
font-weight: bold;
}
-.v-select-twincol-selections-caption {
+.v-select-twincol-caption-right {
float: right;
overflow: hidden;
text-overflow: ellipsis;
.v-select-twincol-options {
float: left;
}
-.v-select-twincol-options-caption {
+.v-select-twincol-caption-left {
float: left;
overflow: hidden;
text-overflow: ellipsis;
.v-select-twincol-selections {
font-weight: bold;
}
-.v-select-twincol-selections-caption {
+.v-select-twincol-caption-right {
float: right;
overflow: hidden;
text-overflow: ellipsis;
.v-select-twincol-options {
float: left;
}
-.v-select-twincol-options-caption {
+.v-select-twincol-caption-left {
float: left;
overflow: hidden;
text-overflow: ellipsis;
.v-select-twincol-selections {
font-weight: bold;
}
-.v-select-twincol-selections-caption {
+.v-select-twincol-caption-right {
float: right;
overflow: hidden;
text-overflow: ellipsis;
/*****************************************************************************/
.v-view {
background: #fff;
-}
\ No newline at end of file
+}
+
+.styled-twincol-captions .v-select-twincol-caption-left {
+ color: red;
+}
+.styled-twincol-captions .v-select-twincol-caption-right {
+ font-size: 30px;
+ color: blue;
+}
+
<pre>.v-table-caption-container</pre> DIV.</li>
</ul>
<li>TwinColSelect DOM structure has changed slightly to support captions for the left and right column.</li>
- <li>TwinColSelect now supports .v-select-twincol-options-caption and .v-select-twincol-selections-caption for the left and right captions.</li>
+ <li>TwinColSelect now supports .v-select-twincol-caption-left and .v-select-twincol-caption-right for the left and right captions.</li>
</ul>
<p>New themeing possibilities:</p>
public HTML getOptionsCaption() {\r
if (optionsCaption == null) {\r
optionsCaption = new HTML();\r
- optionsCaption.setStyleName(CLASSNAME + "-options-caption");\r
+ optionsCaption.setStyleName(CLASSNAME + "-caption-left");\r
optionsCaption.getElement().getStyle()\r
.setFloat(com.google.gwt.dom.client.Style.Float.LEFT);\r
captionWrapper.add(optionsCaption);\r
public HTML getSelectionsCaption() {\r
if (selectionsCaption == null) {\r
selectionsCaption = new HTML();\r
- selectionsCaption.setStyleName(CLASSNAME + "-selections-caption");\r
+ selectionsCaption.setStyleName(CLASSNAME + "-caption-right");\r
selectionsCaption.getElement().getStyle()\r
.setFloat(com.google.gwt.dom.client.Style.Float.RIGHT);\r
captionWrapper.add(selectionsCaption);\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\r
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">\r
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
+<link rel="selenium.base" href="" />\r
+<title>New Test</title>\r
+</head>\r
+<body>\r
+<table cellpadding="1" cellspacing="1" border="1">\r
+<thead>\r
+<tr><td rowspan="1" colspan="3">New Test</td></tr>\r
+</thead><tbody>\r
+<tr>\r
+ <td>open</td>\r
+ <td>/run/com.vaadin.tests.components.select.TwinColSelectCaptionStyles?restartApplication</td>\r
+ <td></td>\r
+</tr>\r
+<tr>\r
+ <td>screenCapture</td>\r
+ <td></td>\r
+ <td>auto-auto</td>\r
+</tr>\r
+<tr>\r
+ <td>click</td>\r
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelectCaptionStyles::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>\r
+ <td></td>\r
+</tr>\r
+<tr>\r
+ <td>screenCapture</td>\r
+ <td></td>\r
+ <td>500px-500px</td>\r
+</tr>\r
+\r
+</tbody></table>\r
+</body>\r
+</html>\r
--- /dev/null
+package com.vaadin.tests.components.select;\r
+\r
+import com.vaadin.tests.components.TestBase;\r
+import com.vaadin.ui.Button;\r
+import com.vaadin.ui.Button.ClickEvent;\r
+import com.vaadin.ui.TwinColSelect;\r
+\r
+public class TwinColSelectCaptionStyles extends TestBase {\r
+\r
+ @Override\r
+ protected void setup() {\r
+ setTheme("tests-tickets");\r
+ final TwinColSelect sel = new TwinColSelect("Component caption");\r
+ sel.setLeftColumnCaption("Left caption");\r
+ sel.setRightColumnCaption("Right caption");\r
+ sel.setStyleName("styled-twincol-captions");\r
+ sel.setWidth("300px");\r
+ addComponent(sel);\r
+\r
+ Button b = new Button("Set height and width to 500px",\r
+ new Button.ClickListener() {\r
+\r
+ public void buttonClick(ClickEvent event) {\r
+ sel.setHeight("500px");\r
+ sel.setWidth("500px");\r
+\r
+ }\r
+ });\r
+ addComponent(b);\r
+ }\r
+\r
+ @Override\r
+ protected String getDescription() {\r
+ 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.";\r
+ }\r
+\r
+ @Override\r
+ protected Integer getTicketNumber() {\r
+ return null;\r
+ }\r
+\r
+}\r