package com.vaadin.tests.components.tabsheet;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
import com.vaadin.ui.Accordion;
import com.vaadin.ui.Label;
import com.vaadin.ui.TabSheet;
public class HtmlInTabCaption extends AbstractReindeerTestUI {
/*
* (non-Javadoc)
*
* @see com.vaadin.tests.components.AbstractTestUI#setup(com.vaadin.server.
* VaadinRequest)
*/
@Override
protected void setup(VaadinRequest request) {
getLayout().setSpacing(true);
TabSheet ts = new TabSheet();
ts.setCaption("TabSheet - no html in tab captions");
ts.setCaptionAsHtml(true);
ts.addTab(new Label(), "red");
ts.addTab(new Label(), "blue");
addComponent(ts);
ts = new TabSheet();
ts.setCaption("TabSheet - html in tab captions");
ts.setCaptionAsHtml(false);
ts.setTabCaptionsAsHtml(true);
ts.addTab(new Label(), "red");
ts.addTab(new Label(), "blue");
addComponent(ts);
Accordion acc = new Accordion();
acc.setCaption("Accordion - no html in tab captions");
acc.setCaptionAsHtml(true);
acc.addTab(new Label(), "red");
acc.addTab(new Label(), "blue");
addComponent(acc);
acc = new Accordion();
acc.setCaption("Accordion - html in tab captions");
acc.setCaptionAsHtml(false);
acc.setTabCaptionsAsHtml(true);
acc.addTab(new Label(), "red");
acc.addTab(new Label(), "blue");
addComponent(acc);
}
@Override
protected Integer getTicketNumber() {
return 14609;
}
}