Example usage for com.vaadin.ui ComponentContainer getCaption

List of usage examples for com.vaadin.ui ComponentContainer getCaption

Introduction

In this page you can find the example usage for com.vaadin.ui ComponentContainer getCaption.

Prototype

public String getCaption();

Source Link

Document

Gets the caption of the component.

Usage

From source file:nz.co.senanque.vaadinsupport.I18n.I18nCaptionHelper.java

License:Apache License

private static void switchCaption(ComponentContainer componentContainer,
        MessageSourceAccessor messageSourceAccessor) {
    String newCaption = getTranslatedCaption(componentContainer.getCaption(), messageSourceAccessor);
    if (newCaption != null) {
        componentContainer.setCaption(newCaption);
    }/*  ww w .  j a  va2 s .  c  o  m*/
    Iterator<Component> it = componentContainer.getComponentIterator();
    while (it.hasNext()) {
        Component subcomponent = it.next();
        switchCaptions(subcomponent, messageSourceAccessor);
    }
}