mirror of
https://gitlab.kit.edu/uskyk/typicalc.git
synced 2024-11-08 10:20:41 +00:00
Set content in LocaleChangeEvent listener
This commit is contained in:
parent
5ddfb355c2
commit
df218d8be8
@ -36,18 +36,18 @@ public class ImageSlide extends Slide implements LocaleChangeObserver {
|
||||
slideLayout = new VerticalLayout();
|
||||
imageKey = imgKey;
|
||||
explanationKey = textKey;
|
||||
explanation = new Span(getTranslation(explanationKey));
|
||||
explanation = new Span();
|
||||
explanation.setId(EXPLANATION_ID);
|
||||
slideLayout.add(new Image(getTranslation(imgKey), StringUtils.EMPTY), explanation);
|
||||
slideLayout.setId(SLIDE_LAYOUT_ID);
|
||||
add(slideLayout);
|
||||
// actual content added in localeChange
|
||||
}
|
||||
|
||||
@Override
|
||||
public void localeChange(LocaleChangeEvent event) {
|
||||
slideLayout.removeAll();
|
||||
explanation.setText(getTranslation(explanationKey));
|
||||
slideLayout.add(new Image(getTranslation(imageKey), StringUtils.EMPTY), explanation);
|
||||
slideLayout.add(new Image(getTranslation(imageKey), ""), explanation);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user