com.vaadin.navigator.View Java Examples
The following examples show how to use
com.vaadin.navigator.View.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainLayout.java From Vaadin4Spring-MVP-Sample-SpringSecurity with Apache License 2.0 | 6 votes |
@Override public void showView(View view) { if (security.hasAuthority("ROLE_USER")) { displayUserNavbar(); } else if (security.hasAuthority("ROLE_ADMIN")) { displayAdminNavbar(); } else { displayAnonymousNavbar(); } if (view instanceof MvpPresenterView) { viewContainer.setContent(((MvpPresenterView) view).getViewComponent()); } }
Example #2
Source File: NotificationUnreadButton.java From hawkbit with Eclipse Public License 1.0 | 5 votes |
public void setCurrentView(final View currentView) { clear(); this.currentView = null; if (!(currentView instanceof AbstractNotificationView)) { return; } this.currentView = (AbstractNotificationView) currentView; this.currentView.refreshView(); }
Example #3
Source File: MainLayout.java From designer-tutorials with Apache License 2.0 | 5 votes |
@Override public void showView(View view) { if (view instanceof Component) { scroll_panel.setContent((Component) view); Iterator<Component> it = side_bar.iterator(); while (it.hasNext()) { adjustStyleByData(it.next(), view.getClass().getName()); } } else { throw new IllegalArgumentException("View is not a Component"); } }
Example #4
Source File: MNavigator.java From viritin with Apache License 2.0 | 5 votes |
@Override public boolean beforeViewChange(ViewChangeListener.ViewChangeEvent event) { View oldView = event.getOldView(); if (oldView != null && oldView instanceof MView) { return ((MView) oldView).beforeViewChange(event); } return true; }
Example #5
Source File: MNavigator.java From viritin with Apache License 2.0 | 5 votes |
@Override public void afterViewChange(ViewChangeListener.ViewChangeEvent event) { View oldView = event.getOldView(); if (oldView != null && oldView instanceof MView) { ((MView) oldView).afterViewChange(event); } }
Example #6
Source File: GazpachoViewDisplay.java From gazpachoquest with GNU General Public License v3.0 | 5 votes |
@Override public void showView(View view) { logger.debug("Displaying View " + view); if (view instanceof CustomComponent) { setContent((CustomComponent) view); } else if (view instanceof ComponentContainer) { setContent((ComponentContainer) view); } else { throw new IllegalStateException("View not supported! "); } }
Example #7
Source File: AbstractHawkbitUI.java From hawkbit with Eclipse Public License 1.0 | 4 votes |
@Override public View getView(final String viewName) { return viewProvider.getView(getStartView(viewName)); }
Example #8
Source File: MyUI.java From framework-spring-tutorial with Apache License 2.0 | 4 votes |
@Override public void showView(View view) { springViewDisplay.setContent((Component) view); }
Example #9
Source File: MainLayout.java From designer-tutorials with Apache License 2.0 | 4 votes |
private void addNavigatorView(String viewName, Class<? extends View> viewClass, Button menuButton) { navigator.addView(viewName, viewClass); menuButton.addClickListener(event -> doNavigate(viewName)); menuButton.setData(viewClass.getName()); }
Example #10
Source File: GazpachoErrorViewProvider.java From gazpachoquest with GNU General Public License v3.0 | 4 votes |
@Override public View getView(String viewName) { logger.info("View name '{}' not found. Redirecting to errorView", viewName); return new ErrorView(); }