@EntryPoint public class Bootstrap { @Inject Navigation navigation; @PostConstruct public void buildUI() { navigation.getContentPanel().setWidth("100%"); navigation.getContentPanel().setHeight("100%"); RootPanel.get().add(navigation.getContentPanel()); } }
@Override public NavigationPanel get() { if (!(navigation.getContentPanel() instanceof NavigationPanel)) { throw new RuntimeException("Default navigation panel is not of type: " + NavigationPanel.class.getName() + ". You replaced it with: " + navigation.getContentPanel().getClass().getName()); } return (NavigationPanel) navigation.getContentPanel(); } }
@Override public NavigationPanel get() { if (!(navigation.getContentPanel() instanceof NavigationPanel)) { throw new RuntimeException("Default navigation panel is not of type: " + NavigationPanel.class.getName() + ". You replaced it with: " + navigation.getContentPanel().getClass().getName()); } return (NavigationPanel) navigation.getContentPanel(); } }
/** * Attach the content panel to the RootPanel if does not already have a parent. */ private void maybeAttachContentPanel() { if (getContentPanel().asWidget().getParent() == null) { RootPanel.get().add(getContentPanel()); } }
/** * Attach the content panel to the RootPanel if does not already have a parent. */ private void maybeAttachContentPanel() { if (getContentPanel().asWidget().getParent() == null) { RootPanel.get().add(getContentPanel()); } }