• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ViewDisplay类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.vaadin.navigator.ViewDisplay的典型用法代码示例。如果您正苦于以下问题:Java ViewDisplay类的具体用法?Java ViewDisplay怎么用?Java ViewDisplay使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ViewDisplay类属于com.vaadin.navigator包,在下文中一共展示了ViewDisplay类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: init

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
@Override
public void init(VaadinRequest request) {
    logger.info("New Vaadin UI created");
    String invitation = request.getParameter("invitation");
    logger.info("Invitation: {} of sessions : {}", invitation);
    setSizeFull();
    GazpachoViewDisplay viewDisplay = new GazpachoViewDisplay();
    setContent(viewDisplay);

    navigator = new Navigator(this, (ViewDisplay) viewDisplay);
    navigator.addProvider(viewProvider);
    navigator.setErrorProvider(new GazpachoErrorViewProvider());

    if (isUserSignedIn()) {
        navigator.navigateTo(QuestionnaireView.NAME);
    } else {
        navigator.navigateTo(LoginView.NAME);
    }
}
 
开发者ID:antoniomaria,项目名称:gazpachoquest,代码行数:20,代码来源:QuestionnairesUI.java


示例2: initNavigator

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
/**
 * Init actuator
 * @param ui Navigator UI
 * @param display Navigator ViewDisplay
 * @return ViewDisplay to use with concrete Navigator
 */
public ViewDisplay initNavigator(UI ui, ViewDisplay display) {
	this.defaultViewDisplay = display;
	// check Authenticate annotation on UI
	uiAuthenticate = ui.getClass().getAnnotation(Authenticate.class);
	return this;
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:13,代码来源:NavigatorActuator.java


示例3: MainLayout

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
public MainLayout() {
    navigator = new Navigator(UI.getCurrent(), (ViewDisplay) this);
    addNavigatorView(DashboardView.VIEW_NAME, DashboardView.class,
            menuButton1);
    addNavigatorView(OrderView.VIEW_NAME, OrderView.class, menuButton2);
    addNavigatorView(AboutView.VIEW_NAME, AboutView.class, menuButton3);
    if (navigator.getState().isEmpty()) {
        navigator.navigateTo(DashboardView.VIEW_NAME);
    }
}
 
开发者ID:vaadin,项目名称:designer-tutorials,代码行数:11,代码来源:MainLayout.java


示例4: SecuredNavigator

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
public SecuredNavigator(UI ui, ViewDisplay display, SpringViewProvider viewProvider, Security security, EventBus eventBus) {
	super(ui, display);		
	this.security = security;
	this.viewProvider = viewProvider;
	this.eventBus = eventBus;
	addProvider(this.viewProvider);
}
 
开发者ID:markoradinovic,项目名称:Vaadin4Spring-MVP-Sample-SpringSecurity,代码行数:8,代码来源:SecuredNavigator.java


示例5: init

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
@Override
protected void init(VaadinRequest request) {
	setLocale(new Locale.Builder().setLanguage("sr").setScript("Latn").setRegion("RS").build());
	
    Navigator navigator = new Navigator(MainUI.this, (ViewDisplay)mainLayout);
    navigator.addProvider(springViewProvider);
    navigator.addViewChangeListener(mainLayout);
    
    setContent(mainLayout);
    
    /*
     * Handling redirections
     */        
    RequestAttributes attrs = RequestContextHolder.getRequestAttributes();        
    if (sessionStrategy.getAttribute(attrs, VaadinRedirectObject.REDIRECT_OBJECT_SESSION_ATTRIBUTE) != null) {        	
    	VaadinRedirectObject redirectObject = (VaadinRedirectObject) sessionStrategy.getAttribute(attrs, VaadinRedirectObject.REDIRECT_OBJECT_SESSION_ATTRIBUTE);
    	sessionStrategy.removeAttribute(attrs, VaadinRedirectObject.REDIRECT_OBJECT_SESSION_ATTRIBUTE);
    	 
    	navigator.navigateTo(redirectObject.getRedirectViewToken());
    	
    	if (redirectObject.getErrorMessage() != null) {
    		Notification.show("Error", redirectObject.getErrorMessage(), Type.ERROR_MESSAGE);
    	}
    	
    }
           
}
 
开发者ID:markoradinovic,项目名称:Vaadin4Spring-MVP-Sample-SpringSecuritySocial,代码行数:28,代码来源:MainUI.java


示例6: init

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
@Override
protected void init(VaadinRequest request) {
	setLocale(new Locale.Builder().setLanguage("sr").setScript("Latn").setRegion("RS").build());
	
    Navigator navigator = new Navigator(MyVaadinUI.this, (ViewDisplay)mainLayout);
    navigator.addProvider(springViewProvider);
    
    navigator.addViewChangeListener(mainLayout);
    setContent(mainLayout);
}
 
开发者ID:markoradinovic,项目名称:Vaadin4Spring-MVP-Sample,代码行数:11,代码来源:MyVaadinUI.java


示例7: init

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
@Override
public void init(UI ui, ViewDisplay display) {
	init(ui, new UriFragmentManager(ui.getPage()), display);
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:5,代码来源:DefaultSpringViewNavigator.java


示例8: setup

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
@Override
public void setup(UI ui, NavigationStateManager stateManager, ViewDisplay display) {
	init(ui, stateManager, display);
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:5,代码来源:DefaultSpringViewNavigator.java


示例9: init

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
@Override
protected void init(UI ui, NavigationStateManager stateManager, ViewDisplay display) {
	super.init(ui, stateManager, actuator.initNavigator(ui, display));
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:5,代码来源:DefaultViewNavigator.java


示例10: init

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
/**
 * {@inheritDoc} Generally shouldn't be called directly.
 */
@Override
protected void init(UI ui, NavigationStateManager stateManager, ViewDisplay display) {
    super.init(ui, stateManager, display);
    addViewChangeListener(new MViewChangeListener());
}
 
开发者ID:viritin,项目名称:viritin,代码行数:9,代码来源:MNavigator.java


示例11: createHistoryApiNavigator

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
/**
 * Creates a navigator that is tracking the active view using the HTML5 History API
 * of the {@link Page} containing the given UI.
 * <p>
 * Navigation is automatically initiated after {@code UI.init()} if a
 * navigator was created. If at a later point changes are made to the
 * navigator, {@code navigator.navigateTo(navigator.getState())} may need to
 * be explicitly called to ensure the current view matches the navigation
 * state.
 *
 * @param ui
 *            The UI to which this Navigator is attached.
 * @param display
 *            The ViewDisplay used to display the views.
 */
public static Navigator createHistoryApiNavigator(final UI ui, final ViewDisplay display){
    return new Navigator(
        ui,
        new HistoryApiNavigationStateManager(
            ui.getPage(),
                contextPath()),
        display);
}
 
开发者ID:apm78,项目名称:history-api-navigation,代码行数:24,代码来源:HistoryApiNavigatorFactory.java


示例12: DefaultSpringViewNavigator

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
/**
 * Creates a navigator.
 * <p>
 * When a custom navigation state manager is not needed, use one of the other constructors which use a URI fragment
 * based state manager.
 * </p>
 * @param ui The UI to which this Navigator is attached.
 * @param stateManager The NavigationStateManager keeping track of the active view and enabling bookmarking and
 *        direct navigation or null to use the default implementation
 * @param display The ViewDisplay used to display the views handled by this navigator
 */
public DefaultSpringViewNavigator(UI ui, NavigationStateManager stateManager, ViewDisplay display) {
	this();
	init(ui, stateManager, display);
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:16,代码来源:DefaultSpringViewNavigator.java


示例13: init

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
/**
 * Initializes an injected navigator and registers {@link SpringViewProvider} for it.
 * <p>
 * The default navigation state manager (based on URI fragments) is used.
 * </p>
 * <p>
 * Navigation is automatically initiated after {@code UI.init()} if a navigator was created. If at a later point
 * changes are made to the navigator, {@code navigator.navigateTo(navigator.getState())} may need to be explicitly
 * called to ensure the current view matches the navigation state.
 * </p>
 * @param ui The UI to which this Navigator is attached
 * @param viewDisplay The ViewDisplay used to display the views handled by this navigator
 */
void init(UI ui, ViewDisplay viewDisplay);
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:15,代码来源:SpringViewNavigator.java


示例14: DefaultViewNavigator

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
/**
 * Creates a navigator that is tracking the active view using URI fragments of the {@link Page} containing the given
 * UI.
 * @param ui The UI to which this Navigator is attached.
 * @param display The ViewDisplay used to display the views.
 */
public DefaultViewNavigator(UI ui, ViewDisplay display) {
	this(ui, new UriFragmentManager(ui.getPage()), display);
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:10,代码来源:DefaultViewNavigator.java


示例15: getDefaultViewDisplay

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
/**
 * Default view display, i.e. the ViewDisplay to use to display Views when is not requested to display View in a
 * Window
 * @return the defaultViewDisplay Default ViewDisplay
 */
public ViewDisplay getDefaultViewDisplay() {
	return defaultViewDisplay;
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:9,代码来源:NavigatorActuator.java


示例16: setup

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
/**
 * Init navigator
 * @param ui UI
 * @param stateManager NavigationStateManager
 * @param display View display
 */
void setup(UI ui, NavigationStateManager stateManager, ViewDisplay display);
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:8,代码来源:ViewNavigatorAdapter.java


示例17: MNavigator

import com.vaadin.navigator.ViewDisplay; //导入依赖的package包/类
/**
 * Creates a navigator.
 *
 * <p>
 * This constructor is exactly similar to
 * {@link com.vaadin.navigator.Navigator#Navigator(com.vaadin.ui.UI, com.vaadin.navigator.NavigationStateManager, com.vaadin.navigator.ViewDisplay)}
 *
 * @param ui the UI for which the Navigator is to be created
 * @param stateManager the NavigationStateManager to be used by this
 * Navigator
 * @param display the ViewDisplay that will be used for showing the views
 * @see com.vaadin.navigator.Navigator#Navigator(com.vaadin.ui.UI,
 * com.vaadin.navigator.NavigationStateManager,
 * com.vaadin.navigator.ViewDisplay)
 */
public MNavigator(UI ui, NavigationStateManager stateManager, ViewDisplay display) {
    super(ui, stateManager, display);
}
 
开发者ID:viritin,项目名称:viritin,代码行数:19,代码来源:MNavigator.java



注:本文中的com.vaadin.navigator.ViewDisplay类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EnumSyntax类代码示例发布时间:2022-05-21
下一篇:
Java MockFloodlightProvider类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap