@Test public void testGetUiLocale() { assertThat(UI.getCurrent(), is(nullValue())); assertThat(UiFramework.getLocale(), is(Locale.GERMAN)); UI ui = MockUi.mockUi(); when(ui.getLocale()).thenReturn(Locale.ITALIAN); assertThat(UiFramework.getLocale(), is(Locale.ITALIAN)); }
@Override public Locale getLocale() { UI ui = UI.getCurrent(); if (ui != null) { Locale locale = ui.getLocale(); if (locale != null) { return locale; } } return Locale.GERMAN; }
Vaadin8 implements UiFrameworkExtension { @Override public Locale getLocale() { UI ui = UI.getCurrent(); if (ui != null) { Locale locale = ui.getLocale(); if (locale != null) { return locale; } } return Locale.GERMAN; } }
Vaadin8 implements UiFrameworkExtension { @Override public Locale getLocale() { UI ui = UI.getCurrent(); if (ui != null) { Locale locale = ui.getLocale(); if (locale != null) { return locale; } } return Locale.GERMAN; }  }
Vaadin8 implements UiFrameworkExtension { @Override public Locale getLocale() { UI ui = UI.getCurrent(); if (ui != null) { Locale locale = ui.getLocale(); if (locale != null) { return locale; } } return Locale.GERMAN; }  @Override Locale getLocale(); @Override ComponentWrapperFactory getComponentWrapperFactory(); @Override Stream<?> getChildComponents(Object uiComponent); }
Vaadin8 implements UiFrameworkExtension { @Override public Locale getLocale() { UI ui = UI.getCurrent(); if (ui != null) { Locale locale = ui.getLocale(); if (locale != null) { return locale; } } return Locale.GERMAN; }  @Override Locale getLocale(); @Override ComponentWrapperFactory getComponentWrapperFactory(); @Override Stream<?> getChildComponents(Object uiComponent);  }